Bug 325837

Summary: Mouse cursor theme kcm shows wrong resize cursor in preview for some themes
Product: [Applications] systemsettings Reporter: Wolfgang Bauer <wbauer1>
Component: kcm_mouseAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: holmgren, unassigned-bugs
Priority: NOR    
Version: 4.11.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
URL: https://bugs.kde.org/show_bug.cgi?id=325763#c15
Latest Commit: Version Fixed In: 4.11.3
Attachments: Screenshot showing the problem

Description Wolfgang Bauer 2013-10-10 08:12:41 UTC
The mouse cursor theme kcm has a preview area for the selected cursor theme.
Normally (for the Oxygen themes e.g.) the resize cursor shown there is the one with arrows from top-left to bottom-right ("size_fdiag").
For themes that don't provide the file "size_fdiag", the other one is shown (arrows from bottom-left to top-right, which would be "size_bdiag" in Oxygen).

Presumably, this also causes the glitch that the wrong shape is shown as resize hint in the current session after applying such a theme (see bug#325763 for more details).

Reproducible: Always

Steps to Reproduce:
1. Open systemsettings and enter the "Cursor Theme" module
2. Select a theme that doesn't provide "size_fdiag", examples include: crystalwhite (and variations like crystalblue), DMZ, Adwaita, redglass, whiteglass and handhelds

Actual Results:  
Preview shows arrows from bottom-left to top-right for the resize cursor

Expected Results:  
Preview should show arrows from top-left to bottom-right for the resize cursor, as is done with themes that do provide the file "size_fdiag" (Oxygen and KDE_classic f.e.)

Apparently in XCursorTheme::findAlternative() (file kcontrol/input/xcursor/xcursortheme.cpp) the alternatives for "size_bdiag" and "size_fdiag" are swapped.

I will create a review request to fix this shortly, but want to test it first.
Comment 1 Wolfgang Bauer 2013-10-10 08:45:40 UTC
Created attachment 82761 [details]
Screenshot showing the problem
Comment 2 Wolfgang Bauer 2013-10-10 09:40:30 UTC
Review Request:
https://git.reviewboard.kde.org/r/113185/
Comment 3 Wolfgang Bauer 2013-10-10 10:16:45 UTC
*** Bug 248599 has been marked as a duplicate of this bug. ***
Comment 4 Wolfgang Bauer 2013-10-13 16:11:43 UTC
Git commit 6a6d6dd2ae997068d452b6a3d43572bd6e16c652 by Wolfgang Bauer.
Committed on 13/10/2013 at 15:59.
Pushed by wbauer into branch 'master'.

Cursor Theme KCM: Show correct resize cursor in preview for themes
without a file called "size_fdiag"

Apparently in XCursorTheme::findAlternative() (file
kcontrol/input/xcursor/xcursortheme.cpp) the alternatives for
"size_bdiag" and "size_fdiag" are swapped, so for themes not containing
"size_fdiag" the wrong resize cursor is shown in the preview.

This patch fixes that long standing bug. (there has been no change to
that function since 2007!)

This also fixes the glitch mentioned in bug#325763, that the wrong
arrows are used for the window resize hint after the theme change is
applied (for the current X session).

M  +2    -2    kcontrol/input/xcursor/xcursortheme.cpp

http://commits.kde.org/kde-workspace/6a6d6dd2ae997068d452b6a3d43572bd6e16c652
Comment 5 Wolfgang Bauer 2013-10-13 16:18:30 UTC
Git commit fa0a5cfc5755b282b3853356821f02c9752aa079 by Wolfgang Bauer.
Committed on 13/10/2013 at 16:14.
Pushed by wbauer into branch 'KDE/4.11'.

Cursor Theme KCM: Show correct resize cursor in preview for themes
without a file called "size_fdiag"

Apparently in XCursorTheme::findAlternative() (file
kcontrol/input/xcursor/xcursortheme.cpp) the alternatives for
"size_bdiag" and "size_fdiag" are swapped, so for themes not containing
"size_fdiag" the wrong resize cursor is shown in the preview.

This patch fixes that long standing bug. (there has been no change to
that function since 2007!)

This also fixes the glitch mentioned in bug#325763, that the wrong
arrows are used for the window resize hint after the theme change is
applied (for the current X session).
FIXED-IN: 4.11.3
REVIEW: 113185

M  +2    -2    kcontrol/input/xcursor/xcursortheme.cpp

http://commits.kde.org/kde-workspace/fa0a5cfc5755b282b3853356821f02c9752aa079