Author: olivier
Date: 2006-11-27 18:31:46 +0000 (Mon, 27 Nov 2006)
New Revision: 23992
Modified:
xfwm4/trunk/src/events.c
Log:
Focus windows that raise themselves if focus stealing prevention is disabled,
and set demands attention flag otherwise, that should improve focus prevention.
Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c 2006-11-27 18:30:19 UTC (rev 23991)
+++ xfwm4/trunk/src/events.c 2006-11-27 18:31:46 UTC (rev 23992)
@@ -1418,21 +1418,24 @@
}
constrained = TRUE;
}
-#if 0
- /* Let's say that if the client performs a XRaiseWindow, we show the
window if hidden */
- if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above))
+ /*
+ Let's say that if the client performs a XRaiseWindow, we show the
window if focus
+ stealing prevention is not activated, otherwise we just set the
"demands attention"
+ flag...
+ */
+ if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) &&
(wc.sibling == None))
{
- if ((c->win_workspace == screen_info->current_ws) ||
- (FLAG_TEST (c->flags, CLIENT_FLAG_STICKY)))
+ ev->value_mask &= ~CWStackMode;
+ if (screen_info->params->prevent_focus_stealing)
{
- if (FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
- {
- clientShow (c, TRUE);
- clientClearAllShowDesktop (screen_info);
- }
+ FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
+ clientSetNetState (c);
}
+ else
+ {
+ clientActivate (c, myDisplayGetCurrentTime(display_info));
+ }
}
-#endif
clientConfigure (c, &wc, ev->value_mask, (constrained ?
CFG_CONSTRAINED : 0) | CFG_REQUEST);
}
else
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits