Bug 325837 - Mouse cursor theme kcm shows wrong resize cursor in preview for some themes
Summary: Mouse cursor theme kcm shows wrong resize cursor in preview for some themes
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_mouse (show other bugs)
Version: 4.11.2
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL: https://bugs.kde.org/show_bug.cgi?id=...
Keywords:
: 248599 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-10 08:12 UTC by Wolfgang Bauer
Modified: 2013-10-13 16:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.3
Sentry Crash Report:


Attachments
Screenshot showing the problem (148.14 KB, image/png)
2013-10-10 08:45 UTC, Wolfgang Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
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