Bug#329057: [Patch] Re: Bug#329057: gnome-randr-applet: Inverted rotation selected automatically (and wrongfully)
Well, I was bored and this has bugged me a few times, so here's the fix: --- src/grandr.c.orig 2006-04-13 01:39:52.0 +0200 +++ src/grandr.c2006-04-13 01:46:19.0 +0200 @@ -253,7 +253,7 @@ while (cur != NULL) { - if ((1 grandr-xr_current_rotation) == ((Rotation) gtk_object_get_data(GTK_OBJECT(cur-data), rotation_value) 0xf )) + if ((grandr-xr_current_rotation (Rotation) gtk_object_get_data(GTK_OBJECT(cur-data), rotation_value)) 1) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (cur-data), TRUE); cur = g_slist_next(cur); It really is obvious, as rotation_value is an int between 0 and 3. I'm attaching a fuller diff that maintains prettier order between the menu entries. The above is the bug fixer, though. /Mikael mån 2005-09-19 klockan 09:26 +0200 skrev Sven Luther: On Mon, Sep 19, 2005 at 09:07:27AM +0200, Mikael Nilsson wrote: Package: gnome-randr-applet Version: 0.2-1 Severity: important When I've just started Xorg and gnome (on my Dell inspiron 8200 laptop using an nvidia GeForce4 440 Go and nvidia drivers 7667), and check the options in the gnome-randr-applet menu, I get a menu with a lot of resolution options (same as xrandr), and a list of four rotations (same set as xrandr). Oh fun, i never saw gnome-randr work with anything but resolution changes, as xfree86 was not supporting rotations. Will have to have a look, don't have time for the next week or so though. However, the selected rotation is Inverted, which is incorrect. This is the output from xrandr: [EMAIL PROTECTED]:~$ xrandr SZ:Pixels Physical Refresh *0 1600 x 1200 ( 323mm x 242mm ) *60 1 1280 x 1024 ( 323mm x 242mm ) 60 2 1024 x 768( 323mm x 242mm ) 60 3800 x 600( 323mm x 242mm ) 60 56 4640 x 480( 323mm x 242mm ) 60 5 1400 x 1050 ( 323mm x 242mm ) 60 6 1440 x 900( 323mm x 242mm ) 60 7 1280 x 960( 323mm x 242mm ) 60 8 1280 x 800( 323mm x 242mm ) 60 9 1280 x 768( 323mm x 242mm ) 60 10 960 x 600( 323mm x 242mm ) 60 11 840 x 525( 323mm x 242mm ) 60 12 700 x 525( 323mm x 242mm ) 60 13 640 x 512( 323mm x 242mm ) 60 14 720 x 450( 323mm x 242mm ) 60 15 640 x 400( 323mm x 242mm ) 60 16 640 x 384( 323mm x 242mm ) 60 17 512 x 384( 323mm x 242mm ) 60 18 400 x 300( 323mm x 242mm ) 60 56 19 320 x 240( 323mm x 242mm ) 60 Current rotation - normal Current reflection - none Rotations possible - normal left inverted right Reflections possible - none [EMAIL PROTECTED]:~$ The end result is that if I choose another resolution (for doing presentation on external projector), grandr also sets the rotation to inverted... Imagine me standing in front of a crowd full of expectations, only to see my screen upside down (Oh, well, I'm using Linux :-). Anyway, I hope there is a simple fix. Probably, maybe we should ping upstream even. Friendly, Sven Luther -- Plus ça change, plus c'est la même chose --- src/grandr.c.orig 2006-04-13 01:39:52.0 +0200 +++ src/grandr.c 2006-04-13 01:46:19.0 +0200 @@ -253,7 +253,7 @@ while (cur != NULL) { - if ((1 grandr-xr_current_rotation) == ((Rotation) gtk_object_get_data(GTK_OBJECT(cur-data), rotation_value) 0xf )) + if ((grandr-xr_current_rotation (Rotation) gtk_object_get_data(GTK_OBJECT(cur-data), rotation_value)) 1) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (cur-data), TRUE); cur = g_slist_next(cur); @@ -314,37 +314,10 @@ grandr-xr_lock_updates = TRUE; - /* Size menu entries */ - - for (i = 0; i grandr-xr_nsize; i++) -{ - g_snprintf(tmp_buf, 128, %5d x %-5d, - grandr-xr_sizes[i].width, grandr-xr_sizes[i].height ); - menu_item = gtk_radio_menu_item_new_with_label (group, tmp_buf); - group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); - - if (i == grandr-xr_current_size) - gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE); - - gtk_object_set_data(GTK_OBJECT (menu_item), size_index, (gpointer)i ); - - g_signal_connect (menu_item, activate, - G_CALLBACK (menu_size_selected_cb), grandr ); - - gtk_menu_shell_append (GTK_MENU_SHELL (grandr-menu), menu_item); - - grandr-size_menu_items = g_slist_append (grandr-size_menu_items, (gpointer)menu_item ); - - gtk_widget_show (menu_item); -} - /* Rotation menu entrys */ if (grandr-xr_rotations 1) { - menu_item = gtk_separator_menu_item_new (); - gtk_menu_shell_prepend (GTK_MENU_SHELL(grandr-menu), menu_item); - gtk_widget_show (menu_item); for (i = 0; i 4; i ++) { @@ -357,14 +330,14 @@ gtk_object_set_data(GTK_OBJECT
Bug#329057: gnome-randr-applet: Inverted rotation selected automatically (and wrongfully)
On Fri, Dec 16, 2005 at 09:40:48PM +0100, René Højbjerg Larsen wrote: Hi, The attached patch fixes the problem (due to bad logic in the rotation detection code). It also reverses the order of the menu entries, making Normal the first entry, followed by Left, which makes a lot more sense than the default behavior, IMHO. If you don't want to make this change then don't apply the second chunk of the patch. Ok, thanks. This should probably be sent upstream. Yeah, not sure if upstream is active still though. Friendly, Sven Luther
Bug#329057: gnome-randr-applet: Inverted rotation selected automatically (and wrongfully)
Hi, The attached patch fixes the problem (due to bad logic in the rotation detection code). It also reverses the order of the menu entries, making Normal the first entry, followed by Left, which makes a lot more sense than the default behavior, IMHO. If you don't want to make this change then don't apply the second chunk of the patch. This should probably be sent upstream. HTH -- René Højbjerg Larsen [EMAIL PROTECTED] --- gnome-randr-applet-0.2/src/grandr.c.orig 2005-12-16 21:14:55.0 +0100 +++ gnome-randr-applet-0.2/src/grandr.c 2005-12-16 21:12:00.0 +0100 @@ -253,7 +253,7 @@ while (cur != NULL) { - if ((1 grandr-xr_current_rotation) == ((Rotation) gtk_object_get_data(GTK_OBJECT(cur-data), rotation_value) 0xf )) + if ((grandr-xr_current_rotation 0xf) == (1 (Rotation) gtk_object_get_data(GTK_OBJECT(cur-data), rotation_value))) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (cur-data), TRUE); cur = g_slist_next(cur); @@ -346,7 +346,7 @@ gtk_menu_shell_prepend (GTK_MENU_SHELL(grandr-menu), menu_item); gtk_widget_show (menu_item); - for (i = 0; i 4; i ++) + for (i = 3; i = 0; i --) { if ((grandr-xr_rotations i) 1) {
Bug#329057: gnome-randr-applet: Inverted rotation selected automatically (and wrongfully)
Package: gnome-randr-applet Version: 0.2-1 Severity: important When I've just started Xorg and gnome (on my Dell inspiron 8200 laptop using an nvidia GeForce4 440 Go and nvidia drivers 7667), and check the options in the gnome-randr-applet menu, I get a menu with a lot of resolution options (same as xrandr), and a list of four rotations (same set as xrandr). However, the selected rotation is Inverted, which is incorrect. This is the output from xrandr: [EMAIL PROTECTED]:~$ xrandr SZ:Pixels Physical Refresh *0 1600 x 1200 ( 323mm x 242mm ) *60 1 1280 x 1024 ( 323mm x 242mm ) 60 2 1024 x 768( 323mm x 242mm ) 60 3800 x 600( 323mm x 242mm ) 60 56 4640 x 480( 323mm x 242mm ) 60 5 1400 x 1050 ( 323mm x 242mm ) 60 6 1440 x 900( 323mm x 242mm ) 60 7 1280 x 960( 323mm x 242mm ) 60 8 1280 x 800( 323mm x 242mm ) 60 9 1280 x 768( 323mm x 242mm ) 60 10 960 x 600( 323mm x 242mm ) 60 11 840 x 525( 323mm x 242mm ) 60 12 700 x 525( 323mm x 242mm ) 60 13 640 x 512( 323mm x 242mm ) 60 14 720 x 450( 323mm x 242mm ) 60 15 640 x 400( 323mm x 242mm ) 60 16 640 x 384( 323mm x 242mm ) 60 17 512 x 384( 323mm x 242mm ) 60 18 400 x 300( 323mm x 242mm ) 60 56 19 320 x 240( 323mm x 242mm ) 60 Current rotation - normal Current reflection - none Rotations possible - normal left inverted right Reflections possible - none [EMAIL PROTECTED]:~$ The end result is that if I choose another resolution (for doing presentation on external projector), grandr also sets the rotation to inverted... Imagine me standing in front of a crowd full of expectations, only to see my screen upside down (Oh, well, I'm using Linux :-). Anyway, I hope there is a simple fix. /Mikael -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-1-686 Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8) Versions of packages gnome-randr-applet depends on: ii libart-2.0-2 2.3.17-1 Library of functions for 2D graphi ii libatk1.0-0 1.10.1-2 The ATK accessibility toolkit ii libbonobo2-0 2.10.0-1 Bonobo CORBA interfaces library ii libbonoboui2-02.10.0-1 The Bonobo UI library ii libc6 2.3.5-6GNU C Library: Shared libraries an ii libgconf2-4 2.10.1-2 GNOME configuration database syste ii libglib2.0-0 2.8.0-1The GLib library of C routines ii libgnome2-0 2.10.1-1 The GNOME 2 library - runtime file ii libgnomecanvas2-0 2.10.2-2 A powerful object-oriented display ii libgnomeui-0 2.10.1-1 The GNOME 2 libraries (User Interf ii libgnomevfs2-02.10.1-5 The GNOME virtual file-system libr ii libgnomevfs2-common 2.10.1-5 The GNOME virtual file-system libr ii libgtk2.0-0 2.6.10-1 The GTK+ graphical user interface ii libice6 6.8.2.dfsg.1-6 Inter-Client Exchange library ii liborbit2 1:2.12.2-3 libraries for ORBit2 - a CORBA ORB ii libpanel-applet2-02.10.2-1 library for GNOME 2 panel applets ii libpango1.0-0 1.8.2-1Layout and rendering of internatio ii libpopt0 1.7-5 lib for parsing cmdline parameters ii libsm66.8.2.dfsg.1-6 X Window System Session Management ii libx11-6 6.8.2.dfsg.1-6 X Window System protocol client li ii libxml2 2.6.21-1 GNOME XML library ii libxrandr26.8.2.dfsg.1-6 X Window System Resize, Rotate and ii libxrender1 1:0.9.0-2 X Rendering Extension client libra ii xlibs 6.8.2.dfsg.1-6 X Window System client libraries m ii zlib1g1:1.2.3-4 compression library - runtime gnome-randr-applet recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#329057: gnome-randr-applet: Inverted rotation selected automatically (and wrongfully)
On Mon, Sep 19, 2005 at 09:07:27AM +0200, Mikael Nilsson wrote: Package: gnome-randr-applet Version: 0.2-1 Severity: important When I've just started Xorg and gnome (on my Dell inspiron 8200 laptop using an nvidia GeForce4 440 Go and nvidia drivers 7667), and check the options in the gnome-randr-applet menu, I get a menu with a lot of resolution options (same as xrandr), and a list of four rotations (same set as xrandr). Oh fun, i never saw gnome-randr work with anything but resolution changes, as xfree86 was not supporting rotations. Will have to have a look, don't have time for the next week or so though. However, the selected rotation is Inverted, which is incorrect. This is the output from xrandr: [EMAIL PROTECTED]:~$ xrandr SZ:Pixels Physical Refresh *0 1600 x 1200 ( 323mm x 242mm ) *60 1 1280 x 1024 ( 323mm x 242mm ) 60 2 1024 x 768( 323mm x 242mm ) 60 3800 x 600( 323mm x 242mm ) 60 56 4640 x 480( 323mm x 242mm ) 60 5 1400 x 1050 ( 323mm x 242mm ) 60 6 1440 x 900( 323mm x 242mm ) 60 7 1280 x 960( 323mm x 242mm ) 60 8 1280 x 800( 323mm x 242mm ) 60 9 1280 x 768( 323mm x 242mm ) 60 10 960 x 600( 323mm x 242mm ) 60 11 840 x 525( 323mm x 242mm ) 60 12 700 x 525( 323mm x 242mm ) 60 13 640 x 512( 323mm x 242mm ) 60 14 720 x 450( 323mm x 242mm ) 60 15 640 x 400( 323mm x 242mm ) 60 16 640 x 384( 323mm x 242mm ) 60 17 512 x 384( 323mm x 242mm ) 60 18 400 x 300( 323mm x 242mm ) 60 56 19 320 x 240( 323mm x 242mm ) 60 Current rotation - normal Current reflection - none Rotations possible - normal left inverted right Reflections possible - none [EMAIL PROTECTED]:~$ The end result is that if I choose another resolution (for doing presentation on external projector), grandr also sets the rotation to inverted... Imagine me standing in front of a crowd full of expectations, only to see my screen upside down (Oh, well, I'm using Linux :-). Anyway, I hope there is a simple fix. Probably, maybe we should ping upstream even. Friendly, Sven Luther -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]