|
|
@ -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); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|