PaperWM
PaperWM copied to clipboard
Windows don't receive input events after monitor switch with scratch layer.
Description
After monitor switch, in combination with scratch layer, windows stop receiving input.
Reproduction steps:
- Using two monitors. Referring to as Monitor 1 and Monitor 2.
- Add at least two tiling windows to Monitor 1 and make one of the windows floating.
- Disable scratch screen on Monitor 1, and use the mouse to activate Monitor 2.
- Open at least one tiled window on Monitor 2.
- Use the mouse to activate a tiled window on Monitor 1, and enable activate the scratch layer and focus/activate the floating window.
- Use the mouse to now select a tiled window on Monitor 1, and no windows are no able to be selected.
It "snaps out of it" by Activating the window to the left or right (with superLeft or superRight by default)
Technical info
- Gnome shell 3.28.4
- On git commit 42a69e6c8b748723fcf06e0c4219b8fc2a40fc04 (Develop branch)
- Ubuntu 18.04.4 LTS
Perhaps related to #297 as it addresses multi-monitor scratch layer problem. Possibly related also related to a similar problem in #110, but in that it occurs with only one monitor https://github.com/paperwm/PaperWM/issues/110#issuecomment-489356359.
Right, we probably need to check if the scratch window is actually on current monitor:
modified stackoverlay.js
@@ -138,7 +138,8 @@ class ClickOverlay {
// But don't change focus if a stuck window is active
if (display.focus_window &&
- display.focus_window.is_on_all_workspaces())
+ display.focus_window.is_on_all_workspaces() &&
+ display.focus_window.get_monitor() == this.monitor.index)
select = display.focus_window;
if (select) {
Though, a bit weird, I'd would've thought workspace.activate_with_focus(...) would actually activate the correct workspace even though the focus is on all workspaces...