Browse Source

Properly set the systray orientation property (bug #5149).

(Old svn revision: 29684)
tags/xfce4-panel-4.10.0
Nick Schermer 12 years ago
parent
commit
3d3b0971f3
2 changed files with 22 additions and 24 deletions
  1. +1
    -0
      NEWS
  2. +21
    -24
      plugins/systray/xfce-tray-manager.c

+ 1
- 0
NEWS View File

@@ -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


+ 21
- 24
plugins/systray/xfce-tray-manager.c View File

@@ -572,7 +572,7 @@ xfce_tray_manager_handle_client_message_message_data (GdkXEvent *xevent,
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 @@ xfce_tray_manager_set_orientation (XfceTrayManager *manager,
_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;

/* 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");

/* 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);
}
/* set the new orientation */
manager->orientation = orientation;

/* 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_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);

/* change the x property */
XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XWINDOW (manager->invisible->window),
orientation_atom,
XA_CARDINAL, 32,
PropModeReplace,
(guchar *) &data, 1);
}




Loading…
Cancel
Save