I think patches already exists down stream.. one part of the patch you
already tried but the second part is changing the way the frame is
detecting the screen.

First Part:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Feb 22 16:18:05 2011 +0100

    panel: Fix issue with context menu

 gnome-panel/panel-context-menu.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/panel-context-menu.c b/gnome-panel/panel-context-menu.c
index a663a44..f25bba8 100644
--- a/gnome-panel/panel-context-menu.c
+++ b/gnome-panel/panel-context-menu.c
@@ -70,6 +70,29 @@ panel_context_menu_delete_panel (PanelToplevel *toplevel)
         panel_delete (toplevel);
 }
 
+static gboolean
+panel_context_menu_check_for_screen (GtkWidget *w,
+                                    GdkEvent *ev,
+                                    gpointer data)
+{
+       static int times = 0;
+       if (!w) {
+               times = 0;
+               return FALSE;
+       }
+       if (ev->type != GDK_KEY_PRESS)
+               return FALSE;
+       if (ev->key.keyval == GDK_KEY_f ||
+           ev->key.keyval == GDK_KEY_F) {
+               times++;
+               if (times == 3) {
+                       times = 0;
+                       start_screen_check ();
+               }
+       }
+       return FALSE;
+}
+
 static void
 panel_context_menu_setup_delete_panel_item (GtkWidget *menu,
                                            GtkWidget *menuitem)
@@ -77,6 +100,8 @@ panel_context_menu_setup_delete_panel_item (GtkWidget *menu,
        PanelWidget *panel_widget;
        gboolean     sensitive;
 
+       panel_context_menu_check_for_screen (NULL, NULL, NULL);
+
        panel_widget = menu_get_panel (menu);
 
        g_assert (PANEL_IS_TOPLEVEL (panel_widget->toplevel));
@@ -177,5 +202,9 @@ panel_context_menu_create (PanelWidget *panel)
        //FIXME: can we get rid of this? (needed by menu_get_panel())
        g_object_set_data (G_OBJECT (retval), "menu_panel", panel);
 
+       g_signal_connect (retval, "event",
+                         G_CALLBACK (panel_context_menu_check_for_screen),
+                         NULL);
+
        return retval;
 }
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Second Part:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
commit e5a7947b25ae2c0aee0fca0c4734db790b978acc
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Feb 22 16:30:24 2011 +0100

    panel: Fix warning

 gnome-panel/panel-applet-frame.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index 8fb803c..7452542 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -824,7 +824,7 @@ panel_applet_frame_activating_free 
(PanelAppletFrameActivating *frame_act)
 GdkScreen *
 panel_applet_frame_activating_get_screen (PanelAppletFrameActivating 
*frame_act)
 {
-       return gtk_widget_get_screen (frame_act->panel);
+       return gtk_widget_get_screen (GTK_WIDGET (frame_act->panel));
 }
 
 PanelOrientation
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/780652

Title:
  Popup menus show on the 1st X server display for some applets on the
  2nd display in 11.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/780652/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to