[Xfce4-commits] r29684 - in xfce4-panel/trunk: . plugins/systray

Nick Schermer nick at xfce.org
Wed Mar 25 21:34:37 CET 2009


Author: nick
Date: 2009-03-25 20:34:37 +0000 (Wed, 25 Mar 2009)
New Revision: 29684

Modified:
   xfce4-panel/trunk/NEWS
   xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c
Log:
Properly set the systray orientation property (bug #5149).


Modified: xfce4-panel/trunk/NEWS
===================================================================
--- xfce4-panel/trunk/NEWS	2009-03-25 10:34:05 UTC (rev 29683)
+++ xfce4-panel/trunk/NEWS	2009-03-25 20:34:37 UTC (rev 29684)
@@ -3,6 +3,7 @@
 - Migrate launcher category icons from 4.4 panels (bug #5067).
 - Fix compilation with -Wl,--as-needed (bug #5103).
 - Don't crash when the quit action button is pressed (bug #5118).
+- Properly set the systray orientation property (bug #5149).
 
 
 4.6.0

Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c	2009-03-25 10:34:05 UTC (rev 29683)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c	2009-03-25 20:34:37 UTC (rev 29684)
@@ -572,7 +572,7 @@
                                                       GdkEvent  *event,
                                                       gpointer   user_data)
 {
-    XClientMessageEvent *xev;
+    XClientMessageEvent *xev = xevent;
     XfceTrayManager     *manager = XFCE_TRAY_MANAGER (user_data);
     GSList              *li;
     XfceTrayMessage     *message;
@@ -797,29 +797,26 @@
     _panel_return_if_fail (XFCE_IS_TRAY_MANAGER (manager));
     _panel_return_if_fail (GTK_IS_INVISIBLE (manager->invisible));
 
-    if (G_LIKELY (manager->orientation != orientation))
-    {
-        /* set the new orientation */
-        manager->orientation = orientation;
+    /* set the new orientation */
+    manager->orientation = orientation;
 
-        /* get invisible display */
-        display = gtk_widget_get_display (manager->invisible);
+    /* get invisible display */
+    display = gtk_widget_get_display (manager->invisible);
 
-        /* get the xatom for the orientation property */
-        orientation_atom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_XFCE_TRAY_MANAGER_ORIENTATION");
+    /* get the xatom for the orientation property */
+    orientation_atom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_SYSTEM_TRAY_ORIENTATION");
 
-        /* set the data we're going to send to x */
-        data[0] = (manager->orientation == GTK_ORIENTATION_HORIZONTAL ?
-                   XFCE_TRAY_MANAGER_ORIENTATION_HORIZONTAL : XFCE_TRAY_MANAGER_ORIENTATION_VERTICAL);
+    /* set the data we're going to send to x */
+    data[0] = (manager->orientation == GTK_ORIENTATION_HORIZONTAL ?
+               XFCE_TRAY_MANAGER_ORIENTATION_HORIZONTAL : XFCE_TRAY_MANAGER_ORIENTATION_VERTICAL);
 
-        /* change the x property */
-        XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
-                         GDK_WINDOW_XWINDOW (manager->invisible->window),
-                         orientation_atom,
-                         XA_CARDINAL, 32,
-                         PropModeReplace,
-                         (guchar *) &data, 1);
-    }
+    /* change the x property */
+    XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
+                     GDK_WINDOW_XWINDOW (manager->invisible->window),
+                     orientation_atom,
+                     XA_CARDINAL, 32,
+                     PropModeReplace,
+                     (guchar *) &data, 1);
 }
 
 




More information about the Xfce4-commits mailing list