Open c60cb859 opened 10 months ago
x11 allows applications to set window their types and roles. Some application do set it, and some might not. For those who set their type and role accordingly for popups, it is possible to disable the centering. _NET_WM_WINDOW_TYPE and WM_TRANSIENT_FOR which can both be accessed with the client class. With some if statements, jumping can be disabled for popups.
Detecting the mouse movement is tricky, and would require fiddling with the timers, but an alternative might be to disable the centering when a click is detected.
yea, another "hack" could be to change the micky to only be active on my move keymaps.. I can se from the comment that it worked like that before
Based on basaran's code, I also rewrote a similar micky : https://github.com/shmilee/awesome-away/blob/master/third_party/micky.lua Then add this in my key bindings to enable/disable centering.
awful.key({ modkey, "Control" }, "c", micky.toggle,
{ description = "toggle cursor follows client", group = "client" })
@c60cb859 It will not touch the cursor when moving the mouse. You can have a look at micky.all_registered_rules
(set class, signal, and corresponding handle function), and add/delete or write new rules based on your requirements.
Expected behavior
I expect the "plug-in" to not touch my cursor when moving the mouse
Actual behavior
If you move the mouse fast back and forth over a border between two windows, is will catch the cursor and center it in one of the windows. This is not really a problem until you have a floating window, where you move the cursor normal speed across two window borders and the script then catches the cursor and center it to the window.
The cursor is not centered if it just moved very slow over borders.
Steps to reproduce the behavior
Looking at the picture below, moving the cursor with the mouse from the floating window 1 to 3 just at normal speed will trigger the script to center the mouse in window 3
Solution
I am not sure about the best solution, I assume it is not possible to see how a focus was changed to only trigger if focus changed due to a jump command and not the mouse moving into the window..