ssokolow / quicktile

Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
https://ssokolow.com/quicktile/
GNU General Public License v2.0
860 stars 78 forks source link

Display a warning if ModMask and per-binding modifiers overlap in potentially confusing ways #121

Open MintDja opened 3 years ago

MintDja commented 3 years ago

At the moment, at home and at work, I use the LinuxMint 19.3 system on which everything works successfully. At the weekend I decided to try LinuhMint 20.1 XFCE at home after debian 10. Both on one and on the other system, the filmed behavior is observed. Windows move around the hotkey, but do not resize. Regards https://youtu.be/wGqtHBpTUak

ssokolow commented 3 years ago

It's probably because you changed ModMask to include <Shift> but didn't delete or change these lines from your config file:

<Shift>KP_1 = move-to-bottom-left
<Shift>KP_2 = move-to-bottom
<Shift>KP_3 = move-to-bottom-right
<Shift>KP_4 = move-to-left
<Shift>KP_5 = move-to-center
<Shift>KP_6 = move-to-right
<Shift>KP_7 = move-to-top-left
<Shift>KP_8 = move-to-top
<Shift>KP_9 = move-to-top-right

I don't have time to double-check right now (I'm about to go to sleep), but those are probably taking precedence.

MintDja commented 3 years ago

Yes, I changed ModMask = <Ctrl><Alt> to ModMask = <Ctrl><Shift> Goodnight

ssokolow commented 3 years ago

Does removing the <Shift>KP_* lines fix the problem?

...because it looks like it's operating as designed to me. (You specified that <Ctrl><Shift><Shift>KP_1 should be move-to-bottom-left, which is the same as <Ctrl><Shift>KP_1 since you can't set a boolean to "double true", and that's what it's doing.)

I didn't intentionally consider what would happen if you specified a ModMask and a keybinding with overlapping modifier requirements, but "obey the more specific match" behaviour seems reasonable... though I might want to have a future version of QuickTile at least print a warning if it detects that.

MintDja commented 3 years ago

yes, the extra lines are to blame! Thank you!

MintDja commented 3 years ago

in this case there are extra lines in the downloaded configuration file

ssokolow commented 3 years ago

Yes. The default configuration is to have holding down <Shift> mean "Don't resize, just move."

It's your job to remove the <Shift> lines if you add <Shift> to ModMask.

...though, as I said, now that you've made me aware of that point of confusion, I'll try to remember to add a warning to the next version.

ssokolow commented 3 years ago

Actually, let's keep this open and rename it as my reminder to add that warning.

ssokolow commented 11 months ago

It's looking like the solution for this will be the new config GUI I'm working on, where the hotkey editor will not have a ModMask (each binding will be exactly what you pressed to set it) and will highlight any conflicting keybindings in red.