[Xfce4-commits] r26584 - xfwm4/trunk/src
Olivier Fourdan
olivier at xfce.org
Mon Jan 21 23:33:27 CET 2008
Author: olivier
Date: 2008-01-21 22:33:27 +0000 (Mon, 21 Jan 2008)
New Revision: 26584
Modified:
xfwm4/trunk/src/display.c
xfwm4/trunk/src/events.c
xfwm4/trunk/src/screen.c
Log:
Exit on SelectionClear event so that xfwm4 exits even with WM who do not send a ClientMEssage event such as Openbox (bug #2374)
Modified: xfwm4/trunk/src/display.c
===================================================================
--- xfwm4/trunk/src/display.c 2008-01-21 21:23:02 UTC (rev 26583)
+++ xfwm4/trunk/src/display.c 2008-01-21 22:33:27 UTC (rev 26584)
@@ -761,7 +761,7 @@
if (TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
{
- display->last_user_time = timestamp;
+ display->last_user_time = timestamp;
}
}
Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c 2008-01-21 21:23:02 UTC (rev 26583)
+++ xfwm4/trunk/src/events.c 2008-01-21 22:33:27 UTC (rev 26584)
@@ -2274,6 +2274,31 @@
}
static eventFilterStatus
+handleSelectionClear (DisplayInfo *display_info, XSelectionClearEvent * ev)
+{
+ eventFilterStatus status;
+ ScreenInfo *screen_info;
+ Client *c;
+ gboolean is_transient;
+
+ TRACE ("entering handleSelectionClear");
+
+ status = EVENT_FILTER_PASS;
+ screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
+ if (screen_info)
+ {
+ if (myScreenCheckWMAtom (screen_info, ev->selection))
+ {
+ TRACE ("root has received a WM_Sn selection event");
+ display_info->quit = TRUE;
+ status = EVENT_FILTER_REMOVE;
+ }
+ }
+
+ return status;
+}
+
+static eventFilterStatus
handleShape (DisplayInfo *display_info, XShapeEvent * ev)
{
Client *c;
@@ -2449,6 +2474,9 @@
case ClientMessage:
status = handleClientMessage (display_info, (XClientMessageEvent *) ev);
break;
+ case SelectionClear:
+ status = handleSelectionClear (display_info, (XSelectionClearEvent *) ev);
+ break;
case ColormapNotify:
handleColormapNotify (display_info, (XColormapEvent *) ev);
break;
Modified: xfwm4/trunk/src/screen.c
===================================================================
--- xfwm4/trunk/src/screen.c 2008-01-21 21:23:02 UTC (rev 26583)
+++ xfwm4/trunk/src/screen.c 2008-01-21 22:33:27 UTC (rev 26584)
@@ -332,6 +332,7 @@
gchar selection[32];
Atom wm_sn_atom;
+ TRACE ("entering myScreenCheckWMAtom");
g_snprintf (selection, sizeof (selection), "WM_S%d", screen_info->screen);
wm_sn_atom = XInternAtom (myScreenGetXDisplay (screen_info), selection, FALSE);
@@ -418,10 +419,10 @@
Ugly hack: KEY_CANCEL is used just for cancelling window ops
it should not be grabbed all the time (especially when you
realize that it's mapped to Esc by default, damn, I can't
- switch back to command mode in vi anymore, I'm stuck in
+ switch back to command mode in vi anymore, I'm stuck in
edition mode ;)
- That's why we start at FIRST_KEY which is defined after
+ That's why we start at FIRST_KEY which is defined after
KEY_CANCEL...
*/
for (i = FIRST_KEY; i < KEY_COUNT; i++)
More information about the Xfce4-commits
mailing list