summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-06-13 10:53:29 +0200
committerStefano Karapetsas <[email protected]>2012-06-13 10:53:29 +0200
commit32879f4b29b115387255580aede2269eb8f818d3 (patch)
tree57cd8445eeaa0f22d73a8162b2f45ce6bb191952
parentbd86f8daead7479405667acb84d4b976301641b2 (diff)
downloadmate-panel-32879f4b29b115387255580aede2269eb8f818d3.tar.bz2
mate-panel-32879f4b29b115387255580aede2269eb8f818d3.tar.xz
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
-rw-r--r--libmate-panel-applet/mate-panel-applet.c4
1 files 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),