xfwm4: moving windows by keyboard in larger steps

Nicolas Roeser Nicolas.Roeser at rz.uni-regensburg.de
Mon May 4 16:48:55 CEST 2020


Hello!

I run xfwm4 and mostly use the keyboard to move windows. This can become 
a bit cumbersome (especially on large displays) from time to time.

This is why I would like to see a feature added to xfwm4: when moving 
windows by keyboard, if a modifier (like the Shift key) is pressed, use 
a bigger step size.

This morning, I had a quick look at the source code, and I think that 
the proper place where to add such a thing would be in file 
‘src/moveresize.c’ in function ‘clientMoveEventFilter’: we see a 
variable ‘key_move’ there, which is normally set to 16. I would like to 
add something like

   if (modifier_pressed) key_move *= 5;

I think that things like this are an appropriate job for a window 
manager, aren’t they? Would you appreciate such a change, in order to 
make it easier for people who need the keyboard when working with xfwm4?

How are pressed modifiers detected in this context? Do they account for 
a separate key press (and release) and do you have to use some static 
variable to track their state? Or can you get the modifier status from 
‘event->key’?

Finally, is it necessary to give the user an option to configure the 
modifier? That would mean that a piece of code has to be added to file 
‘settings.c’, wouldn’t it?

Cheers
-- 
Nico

Nicolas Roeser, Computer Centre, Universität Regensburg
0. Stay at home!   1. Keep distance!
      2. Wash hands properly!   3. Air rooms!


More information about the Xfce4-dev mailing list