Author: olivier
Date: 2008-05-25 16:31:22 +0000 (Sun, 25 May 2008)
New Revision: 26983
Modified:
xfwm4/trunk/src/client.c
xfwm4/trunk/src/events.c
Log:
Do not raise/focus when window buttons are pressed
Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c 2008-05-23 13:13:37 UTC (rev 26982)
+++ xfwm4/trunk/src/client.c 2008-05-25 16:31:22 UTC (rev 26983)
@@ -5431,7 +5431,7 @@
{
ScreenInfo *screen_info;
- TRACE ("entering clientGetButtonPixmap button=%i, state=%i", button,state);
+ TRACE ("entering clientGetButtonPixmap button=%i, state=%i", button,
state);
screen_info = c->screen_info;
switch (button)
{
@@ -5479,10 +5479,12 @@
screen_info = c->screen_info;
+#ifdef WIN_BUTTON_RAISE
if (state == INACTIVE)
{
return (state);
}
+#endif /* WIN_BUTTON_RAISE */
if ((c->button_status[button] == BUTTON_STATE_PRESSED) &&
clientGetButtonPixmap (c, button, PRESSED))
@@ -5496,7 +5498,7 @@
return (PRELIGHT);
}
- return (ACTIVE);
+ return (state);
}
Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c 2008-05-23 13:13:37 UTC (rev 26982)
+++ xfwm4/trunk/src/events.c 2008-05-25 16:31:22 UTC (rev 26983)
@@ -743,6 +743,8 @@
clientHide (c, c->win_workspace, TRUE);
}
break;
+ default:
+ break;
}
}
}
@@ -911,6 +913,7 @@
{
if (ev->button <= Button3)
{
+#ifdef WIN_BUTTON_RAISE
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, ev->time, NO_FOCUS_FLAG);
@@ -920,6 +923,7 @@
clientClearDelayedRaise ();
clientRaise (c, None);
}
+#endif /* WIN_BUTTON_RAISE */
clientButtonPress (c, win, ev);
}
}
@@ -948,6 +952,7 @@
}
else if (tclick != XFWM_BUTTON_UNDEFINED)
{
+#ifdef WIN_BUTTON_RAISE
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, ev->time,
NO_FOCUS_FLAG);
@@ -957,6 +962,7 @@
clientClearDelayedRaise ();
clientRaise (c, None);
}
+#endif /* WIN_BUTTON_RAISE */
ev->window = ev->root;
if (screen_info->button_handler_id)
{
@@ -1526,8 +1532,10 @@
clientClearDelayedFocus ();
}
}
+#ifdef WIN_BUTTON_RAISE
if (c == clientGetFocus ())
{
+#endif /* WIN_BUTTON_RAISE */
for (b = 0; b < BUTTON_COUNT; b++)
{
if (MYWINDOW_XWINDOW(c->buttons[b]) == ev->window)
@@ -1543,7 +1551,9 @@
{
frameQueueDraw (c, FALSE);
}
+#ifdef WIN_BUTTON_RAISE
}
+#endif /* WIN_BUTTON_RAISE */
/* No need to process the event any further */
return EVENT_FILTER_REMOVE;
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits