GNOME Bugzilla – Bug 664363
XF86RotateWindows causes the screen to go black
Last modified: 2012-12-19 17:08:38 UTC
Created attachment 201692 [details] [review] proposed patch When hitting the XF86RotateWindows the screen just goes black instead of actually rotating the screen as intending (with the output turned off). Turns out that gnome-settings-daemon is trying to rotate the screen to an invalid value.. Fixed in attached patch
Good catch. We should be adding a -1 value to the enum though.
In gnome-desktop: commit 1746f00f459b60aa7eb440324da60547ddb1a2ca Author: Bastien Nocera <hadess@hadess.net> Date: Fri Mar 9 12:00:59 2012 +0100 gnome-rr: Add definition for next rotation In gnome-settings-daemon's XRandR plugin, we were relying on -1 meaning "next rotation" so that the "rotate display" button would work as expected. But given its values, GnomeRRRotation would probably have been made unsigned, and thus never matching -1. We now add an "next rotation" member for the benefit of that XRandR plugin. Spotted by Sjoerd Simons <sjoerd@luon.net> and in gnome-settings-daemon: commit f1ced1b94954e206b8ee41a05b9852810f037af5 Author: Sjoerd Simons <sjoerd@luon.net> Date: Fri Mar 9 12:08:16 2012 +0100 xrandr: Fix the rotate display button not working When hitting the XF86RotateWindows the screen just goes black instead of actually rotating the screen as intending (with the output turned off). Turns out that gnome-settings-daemon is trying to rotate the screen to an invalid value. GnomeRRRotation is an enum with only values >= 0, so it is likely to be made unsigned. As the rotation argument to handle_rotate_windows can be -1 to indicate ``next possible rotation'', rotation can't be a GnomeRRRotation as that won't be < 0. https://bugzilla.gnome.org/show_bug.cgi?id=664363
Created attachment 231870 [details] [review] patch The rotate display button still not working, in handle_rotate_windows function, if rotation = 0, then next_rotation = rotation = 0, get_rotation_index() will failed (g_assert_not_reached() is called).
commit 3fa29ef7e3eca5befa5fe2131e66743e8040156e Author: Heiher <admin@heiher.info> Date: Wed Dec 19 18:04:10 2012 +0100 xrandr: Fix "next rotation" not working The GNOME_RR_ROTATION_NEXT enum value was not handled correctly. https://bugzilla.gnome.org/show_bug.cgi?id=664363