[Xfce4-commits] <xfce4-panel:master> Put each window in a new window group.

Nick Schermer noreply at xfce.org
Sun Dec 16 18:16:02 CET 2012


Updating branch refs/heads/master
         to c12b14f5cf553b00e84a4a07e4df62e37e412d26 (commit)
       from 078ef77ff384a6a3c0035d4c8101769627767ea8 (commit)

commit c12b14f5cf553b00e84a4a07e4df62e37e412d26
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Dec 16 18:14:39 2012 +0100

    Put each window in a new window group.
    
    Better wrt grab and stuff.

 panel/panel-application.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/panel/panel-application.c b/panel/panel-application.c
index eb56236..21d84ad 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -1483,6 +1483,7 @@ panel_application_new_window (PanelApplication *application,
   guint               i;
   gchar              *position;
   static gint         unqiue_id_counter = 1;
+  GtkWindowGroup     *window_group;
 
   panel_return_val_if_fail (PANEL_IS_APPLICATION (application), NULL);
   panel_return_val_if_fail (screen == NULL || GDK_IS_SCREEN (screen), NULL);
@@ -1500,6 +1501,11 @@ panel_application_new_window (PanelApplication *application,
   /* create panel window */
   window = panel_window_new (screen, panel_id);
 
+  /* put the window in its own group */
+  window_group = gtk_window_group_new ();
+  gtk_window_group_add_window (window_group, GTK_WINDOW (window));
+  g_object_weak_ref (G_OBJECT (window), (GWeakNotify) g_object_unref, window_group);
+
   /* add the window to internal list */
   application->windows = g_slist_append (application->windows, window);
 


More information about the Xfce4-commits mailing list