Closed br0xpl closed 1 year ago
Several notes here:
Quiet mode may not be the most appropriate term for describing the feature. The window will not go blank, it will still display the content of other monitor. I think passive mode would be more relevant (i.e. it mirrors the other monitor but without tracking user inputs and reacting to them). I am renaming the PR Passive mode.
Squint never takes the focus.
gdk_window_raise()
/gdk_window_hide()
only moves the window to the top or bottom of the stack, which should be a no-op on tiling window managers.WM_TAKE_FOCUS
, client receives it and if it wishes to take the focus then it explicitely calls XSetInputFocus
to receive the focus.gdk_window_set_accept_focus == FALSE
, this prevents gdk from calling XSetInputFocus
when it receives WM_TAKE_FOCUS
.In the submitted code, the passive mode has no effects in fullscreen. It should be made clear that both options cannot be used together: selecting fullscreen mode should disable passive mode and vice versa. It could be interesting to support it in fullscreen mode too, but this would at least require to add an overlay button to let the user close the window in last resort (in case it is misconfigured).
While I believe this is a WM bug, i am inclined to add such a feature. They may be other cases where it could be useful.
Hi @a-ba, Yes I agree fully, specific replies:
How do we proceed? Will you take over from here? Or do you want me to continue the fix?
Kind regards!
I did a few fixes and optimisations in br0xpl/squint#1. Please test it and tell me if it looks fine for you.
@a-ba it works good!
Just one remark: I'm not sure if -p should imply -w... as I wrote previously I see a usecase like this:
You can leave it as it is but the above scenario will not work in such implementation.
That makes sense. I reverted this change.
I opted for another solution : disable the Passive menu item when running in fullscreen mode. This way is even less confusing that the mutual exclusion.
Hi @a-ba, great, thank you! I've tested this and merged it on my side.
Hi there @a-ba,
Nice project!
I'm using i3wm and when working in windowed mode squint "steals" the focus from source monitor because i3wm by default changes focus to the window requiring attention.
Added quiet mode so that squint works well without dropping focus of the source monitor.
Let me know what you think about this.