diff options
author | Stefano Karapetsas <[email protected]> | 2014-06-25 11:26:17 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-06-25 11:26:17 +0200 |
commit | 67c9f12a0d4188b546284efec2d0cd1b90f9052d (patch) | |
tree | d91e012aa6489f8e227bbc0d769c8130923dc2f6 /mate-panel/applet.c | |
parent | 4a769cc810d949623d9f489f244092407c924882 (diff) | |
parent | 5185103c7acac7f6f291bbd5f7c969c8809237e7 (diff) | |
download | mate-panel-67c9f12a0d4188b546284efec2d0cd1b90f9052d.tar.bz2 mate-panel-67c9f12a0d4188b546284efec2d0cd1b90f9052d.tar.xz |
Merge pull request #212 from rilian-la-te/fix_expand
Fix expand
Diffstat (limited to 'mate-panel/applet.c')
-rw-r--r-- | mate-panel/applet.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mate-panel/applet.c b/mate-panel/applet.c index 3d81eab4..fa668e89 100644 --- a/mate-panel/applet.c +++ b/mate-panel/applet.c @@ -598,6 +598,9 @@ mate_panel_applet_position_menu (GtkMenu *menu, { GtkAllocation allocation; GtkRequisition requisition; +#if GTK_CHECK_VERSION(3, 0, 0) + GdkDevice *device; +#endif GdkScreen *screen; GtkWidget *parent; int menu_x = 0; @@ -618,8 +621,12 @@ mate_panel_applet_position_menu (GtkMenu *menu, #endif gdk_window_get_origin (gtk_widget_get_window (applet), &menu_x, &menu_y); +#if GTK_CHECK_VERSION (3, 0, 0) + device = gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gtk_widget_get_display (applet))); + gdk_window_get_device_position(gtk_widget_get_window (applet), device, &pointer_x, &pointer_y, NULL); +#else gtk_widget_get_pointer (applet, &pointer_x, &pointer_y); - +#endif gtk_widget_get_allocation (applet, &allocation); if (!gtk_widget_get_has_window (applet)) { |