qtile
qtile copied to clipboard
cursor_warp makes impossible to put back a browser tab on chrome window (maybe any other browse)
Issue description
When using multi monitors, I find it very useful to change cursor position when changing focus of workspaces and windows.
But as you can see in the video, that's an undesired behavior. As the title already says, I can't put it back.
Other minor issues
When I click, holding CTRL, on a link to open a new tab inside a browser, for example, the cursor goes back to the center of that window.
If i click on someone's profile picture inside telegram-desktop, the cursor also goes back to the center of the window (in this case is indeed a new window because of the way telegram handles this situation specifically).
Thee might be a lot of other examples, but that's the general idea.
Wish list
It would be very nice (at least for me) if we could change this behavior on specifics windows, or if I could invoke a function (with lazy?) that centers the cursor manually when switch to a window or workspace.
Other
If there is documentation for the issue that I'm pointing here, I apologize, but I did a little bit of research before posting this issue.
I'm not demanding the devs to solve my problem, and by the fact that english is not my native language, I'm afraid I'm being a little rude.
https://user-images.githubusercontent.com/50176483/147363025-07b54054-bd96-4fe3-8024-ea7803bb35a2.mp4
Configuration
My config is very long and I don't want to pollute this post, but I can confirm that cursor_warp = True
Hi @erlonbie ,
Don't worry, you're not being rude at all!
I'll be honest, however, I can't see anything in your video at all so I'm not sure what the problem is. The video is just a black screen for me.
@elParaguayo I just noticed that, sorry! In the preview tab was everything normal. How can I upload the video?
can you access this link?
https://user-images.githubusercontent.com/50176483/147363025-07b54054-bd96-4fe3-8024-ea7803bb35a2.mp4
Thanks. That video works.
Yes, that behaviour does look very annoying!
I'll see if I can take a look later. Hopefully there's an easy fix for it.
Thanks. That video works.
Yes, that behaviour does look very annoying!
I'll see if I can take a look later. Hopefully there's an easy fix for it.
Thank you in advance!
I just realized that I posted an issue in Christmas eve, I'm very sorry about that! 😅
(Merry Christmas to all of you and thank you for the great work in qtile! 🎄)
Boas Festas!
I just saw this and decided to try it, i can't replicate that behavior in firefox.
Also thanks for the part of the config that i needed to change for the cursor to move when i change focus, i was just seeking for that
i think an important part of your configuration here is the keybindings, that might be the reason for this behavior
Ok, i did find a weird behavior, i went and moved windows from one screen to the other, when i was in the middle of the second screen it moved my cursor, it also did the same when trying to change windows, i think it might be trying to warp the cursor in events that are undesirable, like while dragging something from one screen to another, or when changing focus of windows, i hope my testings help a little
If I set cursor_warp=True
I get this behaviour.
I tried a few more things, finally i get that, if i set
follow_mouse_focus = False
bring_front_click = False
cursor_warp = True
i get most issues kinda solved, but i still get that the window on top would not change when i try to use another window,
if i add bring_front_click = True
then i might or might not be able to change windows, depending on if i have a widow maximized or not
that leads me to believe it is more about the different configurations interacting with each other, i have not read the code enough to make a good conclusion, but now i can add that the behavior changes depending on other configuration parameters
Yeah. It's to do with windows being focused.
That's how this parameters are set for me.
(just in case my image does not loads properly)
follow_mouse_focus = True
bring_front_click = False
cursor_warp = True
If I change bring_front_click = True
, I still get the same behavior.
Try changing follow_mouse_focus
to True, that one is the one that caused more unexpected behavior, there also might be other options interacting, those where the ones i tried
Have found another time when this is annoying: triple-clicking to select all text in LibreOffice Calc warps the cursor back to the centre!
I have follow_mouse_focus = False
so maybe that is linked to this.
EDIT: no. Still happens if I set this to True.
I think this is to do with handling of the focus event. The cursor warps when the window is told to focus but we probably only want to do this if the window isn't already focused.
I think this is to do with handling of the focus event. The cursor warps when the window is told to focus but we probably only want to do this if the window isn't already focused.
This would already solve a lot of annoyances !
Have posted a fix for this. Would be great if someone could test (no rush - enjoy time with families etc.!)
Hello @elParaguayo , I've updated to 0.19.1.dev6+g12efb431 (running qtile --version). Nothing has changed apparently.
It's not committed. You'd need to apply the PR and test locally.
How do I do this? I've never done that before.
In last case, I might change it manually since is just a few lines of code that need to be modified.
EDIT: It solved the issues that I pointed, but cursor_warp is not functioning as it should be.
For example: If I switch to other workspace (lazy.next_screen()
), the cursor should center that workspace. The same applies to lazy.group.next_window()
, it should center the focused window, but that's not happening.
Yeah. It's not working properly. I'll keep looking.
Hopefully I've got it this time.
Hopefully I've got it this time.
I did the changes you made, but it didn't solve it for me. Now is occurring new bugs xD
I'll show up in the next message
https://user-images.githubusercontent.com/50176483/147427386-5346b5f3-29dd-4fdf-a537-b6709193575b.mp4
- Windows are not growing until some window is focused
- Same issue of not being able to put a chrome tab back
- In the end if you look at the top left corner, you'll see I'm switching workspace (calling
lazy.next_screen()
andlazy.prev_screen()
), but the mouse cursor stays in the same place.
Ctrl+click to open a new tab is working fine though
I'm feeling a little bad about this issue, I don't know if it is taking too much of your time, sorry!
(off topic: these default emojis are bad, they're just there because every oh-my-bash update restores them to default )
Don't feel sad - let's see if we can fix it!
OK - try this next approach.
As for putting Chrome tabs back. I can't actually do this if I have cursor_warp
set to False
. Did it ever work for you?
I tried here and is working almost as expected!
If I set cursor_warp = False
, I'm able to put chrome tabs in place normally.
If I set cursor_warp = True
, I'm not able to put chrome tabs in place (the issue persists). But, for this specific issue I think we should not focus so much effort, because (I just discovered) you're able to put it back with a right click on the "alone" tab, and select an option to move to an already existing window (I'm pretty satisfied with that).
The only missing thing is when I change workspace with lazy.next_screen()
and lazy.prev_screen()
, the mouse cursor should change position to the focused window in that specific workspace, but it is not moving/changing.
In other hand, lazy.group.next_window()
and lazy.group.prev_window()
are working as they should! The same applies to lazy.screen.next_group()
and lazy.screen.prev_group()
Great. We're getting closer! Let me try a few more things.