Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upWindow manager "Urgency" hint is ignored for domU windows #2642
Comments
andrewdavidwong
added
C: desktop-linux
C: gui-virtualization
UX
labels
Feb 19, 2017
andrewdavidwong
added this to the Release 3.2 updates milestone
Feb 19, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@marmarek, is this intentional? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Feb 20, 2017
Member
Clearly this window manager hint is not supported, but I'm not sure if it should be. For example, will it make easier for application to steal the focus?
|
Clearly this window manager hint is not supported, but I'm not sure if it should be. For example, will it make easier for application to steal the focus? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
keepiru
Feb 21, 2017
I think it should be supported. Many applications use it: Email and IM clients to indicate new messages are waiting; terminals to indicate a bell.
My use case is instant messaging. I'm failing to notice PMs when the window is hidden.
The flag is used for window decoration and taskbar highlights to attract the user's attention, but focus is not automatically changed; the user has to do so manually, at least in every window manager I've used. XFWM4 certainly doesn't use it to change focus. You can test this by setting the flag on dom0 windows.
keepiru
commented
Feb 21, 2017
|
I think it should be supported. Many applications use it: Email and IM clients to indicate new messages are waiting; terminals to indicate a bell. My use case is instant messaging. I'm failing to notice PMs when the window is hidden. The flag is used for window decoration and taskbar highlights to attract the user's attention, but focus is not automatically changed; the user has to do so manually, at least in every window manager I've used. XFWM4 certainly doesn't use it to change focus. You can test this by setting the flag on dom0 windows. |
andrewdavidwong
added
the
enhancement
label
Feb 21, 2017
andrewdavidwong
modified the milestones:
Far in the future,
Release 3.2 updates
Feb 21, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 22, 2017
Member
Something very similar is supported: _NET_WM_STATE_DEMANDS_ATTENTION flag:
https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html
Maybe support for "urgency" flag could be plugged into the same feature?
|
Something very similar is supported: Maybe support for "urgency" flag could be plugged into the same feature? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
aidecoe
Apr 28, 2018
@marmarek Could you suggest in which component it should be implemented, please?
aidecoe
commented
Apr 28, 2018
|
@marmarek Could you suggest in which component it should be implemented, please? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
May 14, 2018
Member
Dom0 part: https://github.com/QubesOS/qubes-gui-daemon/
VM part: https://github.com/QubesOS/qubes-gui-agent-linux/
Related protocol part: https://github.com/QubesOS/qubes-gui-common/blob/master/include/qubes-gui-protocol.h#L198-L204
Not sure how "Urgency" is different from "Demands attention", but if they are in practice the same, maybe this thing could be merged? I.e. at gui-agent side set the flag if either of them is set and in gui-daemon - set both. This would reduce number of possible flags combinations controllable by VM (Xorg is full of corner cases),
|
Dom0 part: https://github.com/QubesOS/qubes-gui-daemon/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
donob4n
May 15, 2018
Maybe this could be handled from dom0 like fullscreen. Only trusted domains are allowed to steal focus.
donob4n
commented
May 15, 2018
|
Maybe this could be handled from dom0 like fullscreen. Only trusted domains are allowed to steal focus. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
May 15, 2018
Member
I think no qube should be allowed to steal focus. This is a bit tricky, even without this urgency flag implemented (see various window manager settings), but lets not make things even worse.
|
I think no qube should be allowed to steal focus. This is a bit tricky, even without this urgency flag implemented (see various window manager settings), but lets not make things even worse. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
aidecoe
May 15, 2018
Urgency has nothing to do with stealing focus, IIUC. Window notifies window manager that it needs attention, but the window is not brought up. In e.g. dwm, awesome or i3 the effect is that window title and tag on which the window has signaled "urgency" is highlighted. Nothing more. "Urgency" would be implemented similarly as "demands attention".
aidecoe
commented
May 15, 2018
|
Urgency has nothing to do with stealing focus, IIUC. Window notifies window manager that it needs attention, but the window is not brought up. In e.g. dwm, awesome or i3 the effect is that window title and tag on which the window has signaled "urgency" is highlighted. Nothing more. "Urgency" would be implemented similarly as "demands attention". |
keepiru commentedFeb 18, 2017
Qubes OS version (e.g.,
R3.2):R3.2
Affected TemplateVMs (e.g.,
fedora-23, if applicable):Any
Expected behavior:
Taskbar icon ("Window Button") blinks when WM_HINTS urgency bit is set.
Actual behavior:
Urgency is handled correctly for dom0 windows, but ignored for domU.
Steps to reproduce the behavior:
Repro (a):
urgent_hello.c.txt
In an AppVM:
$ gcc -L/usr/X11R6/lib -lX11 urgent_hello.c
$ ./a.out
When the window opens, alt-tab away so it is backgrounded. After two seconds the urgency hint will be set. Observe that taskbar icon does not blink.
Copy a.out to dom0 and repeat. Observe that the taskbar icon blinks as expected.
Repro (b):
Launch xterm in dom0.
Control-middle_click, check "Enable Bell Urgency"
$ sleep 2 ; echo -e '\a'
Alt-tab to background the window.
Observe blinking taskbar icon.
Repeat in AppVM. Observe non-blinking taskbar icon.
General notes:
https://github.com/QubesOS/qubes-issues/files/784748/urgent_hello.c.txt
https://tronche.com/gui/x/icccm/sec-4.html#WM_HINTS
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#URGENCY
Related issues: