From 32879f4b29b115387255580aede2269eb8f818d3 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 13 Jun 2012 10:53:29 +0200 Subject: Use right GdkScreen for focus request and menu http://bugzilla-attachments.gnome.org/attachment.cgi?id=179797 Calling gtk_widget_get_screen() on a widget embedded in a plug doesn't necessarily return what you expect (because of gtk_widget_get_toplevel()). Instead, call gtk_window_get_screen() on the plug. https://bugzilla.gnome.org/show_bug.cgi?id=632369 --- libmate-panel-applet/mate-panel-applet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index 4a5998c9..6993505e 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -701,7 +701,7 @@ mate_panel_applet_request_focus (MatePanelApplet *applet, g_return_if_fail (PANEL_IS_APPLET (applet)); - screen = gtk_widget_get_screen (GTK_WIDGET (applet)); + screen = gtk_window_get_screen (GTK_WINDOW (applet->priv->plug)); root = gdk_screen_get_root_window (screen); display = gdk_screen_get_display (screen); @@ -955,7 +955,7 @@ mate_panel_applet_position_menu (GtkMenu *menu, applet = MATE_PANEL_APPLET (widget); - screen = gtk_widget_get_screen (widget); + screen = gtk_window_get_screen (GTK_WINDOW (applet->priv->plug)); gtk_widget_size_request (GTK_WIDGET (menu), &requisition); gdk_window_get_origin (gtk_widget_get_window (widget), -- cgit v1.2.1