By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1437

Summary: Changing mouse cursor theme should not require restarting Trinity
Product: TDE Reporter: Darrell <darrella>
Component: tdebaseAssignee: Francois Andriot <albator78>
Status: PATCHAVAIL ---    
Severity: minor CC: albator78, bugwatch, darrella
Priority: P5    
Version: R14.0.x [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 2968    
Attachments: tdebase 14.0.0 : applies new cursor theme immediatly
tdebase 14.0.0 : applies new cursor theme immediatly (2)

Description Darrell 2013-04-07 13:12:07 CDT
Changing the mouse cursor theme requires restarting Trinity. Kind of like Windows needing to be rebooted all the time. :) KDE4 does not require restarting KDE when changing the mouse theme, nor does Xfce IIRC.

Note: this report is related to bug report 926 because the same confirmation dialog is used (the underlying rc setting is in kcontrolrc -> [Notification Messages] -> CursorSettingsChanged).
Comment 1 Francois Andriot 2013-07-23 09:30:31 CDT
Created attachment 1368 [details]
tdebase 14.0.0 : applies new cursor theme immediatly

This is a first attempt at fixing this issue.
I backported the code from KDE 4.10 into TDE.

It seems to work at first look, BUT there is still a problem: some applications still use the previous cursor theme, not the new one.
For example. if you run kcontrol, change mouse cursor, close kcontrol, reopen control, you still see the old cursor theme, in kcontrol only.

On the positive side, the cursor setting code from KDE4 look more efficient that what we have in "kapplymousetheme.cpp" in TDE. For example, I had troubles having the TDE's cursor in Thunderbird, but it worked in KDE4. Now it works in TDE too :-)
I think the "applyTheme" function code should replace the current code used in "kapplymousetheme.cpp" and "main.cpp" under "kcontrol/input" (BTW the current code is duplicated ...).

Finally, KDE4 provides a mechanism to notify all applications that they must reload the settings, but TDE does not. It implies backporting some kdelibs4 stuff. So I removed this code.
I think this is why TDE is forced to logoff/login again the user, in order to run the "kcmapplymousetheme" command at startup (in "starttde" script) BEFORE starting ksmserver and kded, because at a later time, these 2 Processes can not change mouse cursor.

I will look into the KDE4 notification mechanism soon.
Comment 2 Francois Andriot 2013-07-23 10:08:22 CDT
Created attachment 1369 [details]
tdebase 14.0.0 : applies new cursor theme immediatly (2)

Already a fix, because the dcop notification did not work in previous patch. Now it works and the newly-started applications have correct cursor (e.g. my example with badly working kcontrol is fixed)

Problem remains with "always running applications" like kicker, which still uses old cursor theme. 
Maybe a workaround would be to restart kicker but I don't know if other applications have same problem...
Comment 3 Darrell 2013-07-23 10:38:54 CDT
With respect to restarting kicker, would the code in the "Configure Panel" option be usable? "Right-click" on the panel and select the "Configure Panel" option from the popup menu. When changes are made, kicker very much acts as though the process is being restarted because the entire panel momentarily disappears.
Comment 4 Francois Andriot 2013-07-23 12:09:41 CDT
Yes, but I think kicker is the easy part of the problem :)
We have to restart twin too, as well as the "main" TDE processes (ksmserver, kded ...) which cannot be killed at all.
Comment 5 Darrell 2013-07-23 12:11:24 CDT
Okay, I was just trying to help by encouraging ideas. You code gurus know better than me what is needed. :-)
Comment 6 Darrell 2013-11-20 20:08:05 CST
Francois, has there been any progress changes in this report?