diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2020-12-05 13:49:22 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2020-12-05 14:05:21 +0100 |
commit | 1428477b436930d6cd205b1d744ad5fa20f1dcbb (patch) | |
tree | 6a1cf8e02431648782b9b7ab146a052bb7f1187b | |
parent | f1f845821deff364ebbeac27ef41f2dc3969ab83 (diff) | |
download | xfwm4-1428477b436930d6cd205b1d744ad5fa20f1dcbb.tar.gz |
netwm: Do not raise window if activate is set to none
If activate action is set to "none" and focus stealing prevention is
enabled, set the demand attention flag rather that raising the window,
so it doesn't come into the way of the user.
Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/441
-rw-r--r-- | src/netwm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/netwm.c b/src/netwm.c index 8936c0f11..031f746c8 100644 --- a/src/netwm.c +++ b/src/netwm.c @@ -1446,7 +1446,9 @@ clientHandleNetActiveWindow (Client *c, guint32 timestamp, gboolean source_is_ap current_time = myDisplayGetLastUserTime (display_info); TRACE ("time of event received is %u, current XServer time is %u", (guint32) ev_time, (guint32) current_time); - if ((screen_info->params->prevent_focus_stealing) && TIMESTAMP_IS_BEFORE((guint32) ev_time, (guint32) current_time)) + if ((screen_info->params->prevent_focus_stealing) && + (TIMESTAMP_IS_BEFORE((guint32) ev_time, (guint32) current_time) || + (screen_info->params->activate_action == ACTIVATE_ACTION_NONE))) { focused = clientGetFocus (); /* We do not want to set the demand attention flag if the window is focused though */ |