Closed trivoldus28 closed 11 months ago
Added more code to improve multimonitor support, which should fix issue https://github.com/gerritdevriese/kzones/issues/36.
The bug was that the "active screen" was set to whatever the mouse was on, so shortcuts moved windows to the screen the mouse is on instead of where the window is currently at.
Someone's on a roll 😉
I'm just personally motivated to be more productive haha. I just joined the bandwagon of using 4K 42" TVs as monitors and window management with these guys are a totally different beast than regular monitors. KWin scripting is also surprisingly fun :)
Better logic for determining a window is actually moved, in which case the zone is set to -1. Otherwise if the window is not actually moved the zone is unchanged.
The problem is that for some applications (e.g., Chrome), simply clicking on the title bar (not dragging) the script is signaled that the window is "moving" and thus when the mouse button is released, its zone will be set to -1 regardless whether the window is moved or not. This patch creates a
moved
variable to track if the window is actually moved, and if not does not reset the window's zone.