-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override redirect protection does not consider multiple windows #7085
Comments
Which measure do you think should be better for the purpose? The area of union of rectangles, or the covering bounding box? |
I'd say the former. The later could have frequent false-positives (like, four tiny windows in screen corners). |
I just came up with some more scenarios override-redirect windows could be abused:
Thus, in addition to union-of-rectangles, I suppose that the protection should:
|
I don't want this check to be too complex, or too slow to compute... Maybe make the limit tighter (80%?) and/or add override-redirect windows number to the heuristic (10? 20?). |
Unless I am missing something (I probably am), 2 or 3 should be a reasonable limit. |
No, that will trivially cause false-positives. Take 2-level menu, add some notification and boom. |
Whoops! Then indeed I was missing something. |
This issue is being closed because:
If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment. |
Still an issue in R4.1. |
This comment was marked as outdated.
This comment was marked as outdated.
Still affects 4.2, or at least I am not aware of a change that fixed it. |
How to file a helpful issue
Qubes OS release
R4.0
Brief summary
Override-redirect protection protects against a single window covering the whole screen. Specifically, if a window with override-redirect flag covers more than 90% of the screen area, it's override-redirect flag is cleared. But, it does not consider multiple windows together covering the whole screen.
Steps to reproduce
xfce4-screensaver
in a VM.Expected behavior
Screen locking windows are converted to normal windows.
Actual behavior
Each monitor is covered with a separate, override-redirect window. Each use about 50% of the total screen area (depending on monitor resolutions), but together they cover it all.
In that case, one can still use
qvm-xkill
(bound to Ctrl+Alt+Esc by default), or switch to tty2 and kill the VM (or the process) from there.Proposed solution
Consider not only a single window, but all the windows with override-redirect flag set. Sum their areas and compare that against screen area. For simplicity, do not consider their positions (this may lead to false-positives, when there are several small windows in the same place, but those should be rather unlikely).
I'm not sure what should be the action if they cross 90% threshold. Some ideas:
I'm leaning towards the last option, but requires checking what will happen in practice if a menu or a tooltip get the flag cleared (as a side effect).
The text was updated successfully, but these errors were encountered: