[Xfce4-commits] r27226 - xfwm4/branches/xfce_4_4/src

Olivier Fourdan olivier at xfce.org
Mon Jul 7 10:21:44 CEST 2008


Author: olivier
Date: 2008-07-07 08:21:44 +0000 (Mon, 07 Jul 2008)
New Revision: 27226

Modified:
   xfwm4/branches/xfce_4_4/src/menu.c
Log:
Set monitor when positionning menu (Bug #4162)

Modified: xfwm4/branches/xfce_4_4/src/menu.c
===================================================================
--- xfwm4/branches/xfce_4_4/src/menu.c	2008-07-07 08:09:21 UTC (rev 27225)
+++ xfwm4/branches/xfce_4_4/src/menu.c	2008-07-07 08:21:44 UTC (rev 27226)
@@ -88,6 +88,8 @@
 {
     GtkRequisition req;
     GdkPoint *pos;
+    gint monitor;
+    GdkScreen *screen;
 
     pos = user_data;
 
@@ -111,6 +113,11 @@
     {
         *y = (gdk_screen_height () - req.height) / 2;
     }
+
+    screen = gtk_widget_get_screen (GTK_WIDGET(menu));
+    monitor = find_monitor_at_point (screen, *x, *y);
+    gtk_menu_set_monitor (GTK_MENU (menu), monitor);
+
     g_free (user_data);
 }
 



More information about the Xfce4-commits mailing list