[Xfce4-commits] r24087 - xfwm4/trunk/src

Olivier Fourdan olivier at xfce.org
Tue Dec 12 21:07:30 CET 2006


Author: olivier
Date: 2006-12-12 20:07:29 +0000 (Tue, 12 Dec 2006)
New Revision: 24087

Modified:
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/screen.c
Log:
Quit nicely when MANAGE client message is received, so that xfwm4 obeys to ICCCM2 standard (bug #2374)

Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c	2006-12-12 11:52:46 UTC (rev 24086)
+++ xfwm4/trunk/src/events.c	2006-12-12 20:07:29 UTC (rev 24087)
@@ -2151,6 +2151,11 @@
                                 frameDecorationRight (screen_info),
                                 frameDecorationBottom (screen_info));
         }
+        else if (ev->message_type == display_info->atoms[MANAGER])
+        {
+            TRACE ("window (0x%lx) has received a manager event", ev->window);
+            display_info->quit = TRUE;
+        }
         else
         {
             TRACE ("unidentified client message for window 0x%lx", ev->window);

Modified: xfwm4/trunk/src/screen.c
===================================================================
--- xfwm4/trunk/src/screen.c	2006-12-12 11:52:46 UTC (rev 24086)
+++ xfwm4/trunk/src/screen.c	2006-12-12 20:07:29 UTC (rev 24087)
@@ -50,12 +50,11 @@
 ScreenInfo *
 myScreenInit (DisplayInfo *display_info, GdkScreen *gscr, unsigned long event_mask)
 {
-#ifdef ENABLE_KDE_SYSTRAY_PROXY
     gchar selection[32];
-#endif
     ScreenInfo *screen_info;
     GdkWindow *event_win;
     PangoLayout *layout;
+    Atom wm_sn_atom;
     long desktop_visible;
     int i;
 
@@ -187,6 +186,10 @@
     screen_info->systray = getSystrayWindow (display_info, screen_info->net_system_tray_selection);
 #endif
 
+    g_snprintf (selection, sizeof (selection), "WM_S%d", screen_info->screen);
+    wm_sn_atom = XInternAtom (display_info->dpy, selection, FALSE);
+    XSetSelectionOwner (display_info->dpy, wm_sn_atom, screen_info->xfwm4_win, myDisplayGetCurrentTime (display_info));
+
     screen_info->box_gc = None;
     screen_info->black_gc = NULL;
     screen_info->white_gc = NULL;



More information about the Xfce4-commits mailing list