! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
New window isn't poped on top
Status:
RESOLVED: FIXED

Comments

Description Yan Pas 2016-06-07 21:32:44 CEST
Make chrome / chromium your default browser
then
$ exo-open http://example.com

Browser's window is raised on top, but input receives terminal. Try to open alt+tab and you'll see that terminal window is on top, but visually the browser window is on top.

using xfwm4 master, linux 4.2, linux mint 17.3
Comment 1 Olivier Fourdan editbugs 2016-06-08 09:14:19 CEST
The problem is that the timestamp passed by exo-open is too old by the time the window is actually activated, so the window is not focused by the Xserver.

This is a pretty common issue with exo-open, it uses the startup notification with uses a timestamp, but that timestamp will necesarily end up being inaccurate when invoked from the command line...

The correct behaviour in this case would be not to raise nor focus the window at all.
Comment 2 Yan Pas 2016-06-08 21:53:14 CEST
If the default browser is Firefox e. g. xfwm4 places it on top, in other words behaves correctly

Also I've noticed that the same story happens with xdg-open too (maybe because xdg-open is just symlink to exo-open or smth).
Comment 3 Olivier Fourdan editbugs 2016-06-09 08:46:49 CEST
The timestamp passed is too old, that's a fact, and that's why the window doesn't get focused. Where that timestamp comes from, or why does it differ when FF is used instead, I cannot tell (I don't have the time to dig into such large code base, that wouldn't help with the issue anyway).

I could fix xfwm4 to raise the window only when it eventually gets focused instead of doing it when the EWMH activate message is received, but it's fairly touchy given the number of possibilities (focus follow mouse vs. click to focus, raise automatically, etc.) so best would be to fix that in master rather than the stable xfce-4.12 branch.
Comment 4 Olivier Fourdan editbugs 2016-06-14 09:14:32 CEST
So I pushed a fix for this in master, the window will not be raised unless it's focused, meaning that a NET_WM_ACTIVATE with an old timestamp (such as this case) will not focus nor raise the window in click-to-focus mode.
Comment 5 Yan Pas 2016-06-14 18:49:32 CEST
Thanks, wm works correctly. May be closed
Comment 6 Yan Pas 2017-10-15 14:24:29 CEST
fixed
Comment 7 Yan Pas 2017-10-15 14:24:59 CEST
-

Bug #12634

Reported by:
Yan Pas
Reported on: 2016-06-07
Last modified on: 2017-10-15

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information