-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
current windows lost focus when mouse move across monitor #389
Comments
No, I don't think we support that atm. (ie.: the focus follow the mosepointer when it change monitor - focusing the selected window on that monitor) (correct me if I'm wrong hedin) |
I'm not sure I'm understanding this one right - you want to have two windows focused (selected?) at the same time? Need some more information here. Planning on closing this in a month or so unless it's still an issue or you can provide more information. |
No I think the OP just want to turn off the "auto follow focus" (i.e. when you move the mouse to the other monitor, the focus changes to the last active window on that monitor). I think it is feasible to add a setting for that. |
ah, that makes sense. Yes, probably should have a setting for this. |
I also would like to disable that. The reason are dialogs that you move to another monitor are pushed in the background what makes it complicated to go back to them:
Immediately the window loses its focus and the dialog is pushed in the behind the active window on your second screen. |
I think adding an option to not have "focus follow mouse" would be fine. But I also noticed this behavior. Unfortunately in Gnome dialogs are tied to the "parent" window. So if you move a dialog to another monitor than its parent, it gets very hard to control it. Normally in Gnome you can't even interact with the parent window and the dialog is fixed to the center of the parent. But we turn off that behavior because I think it causes some problems for PaperWM. I don't know if or how we can fix that. It might get pretty complicated because we have to work against some Gnome behavior. |
Just wanted to chip in with saying that as a user who primarily navigates between windows and workspaces with the keyboard, adding this option would be extremely valuable to me, regardless of the dialogs issue. |
new user here, with 2 monitors (with different sizes, if that matters somehow): I think I also see this issue on my system. |
… simpler implementation (#751) @Lythenas, @Thesola10, I've been thinking about this one for a while: PaperWM uses a very curious approach to implement a "one space per monitor" paradigm (see [my response](peterfajdiga/karousel#3 (comment)) to a question of how PaperWM does this). Unfortunately this approach is quite complex and exhibits many side-effects that have required many workarounds (which often causes further issues). This PR replaces this approach with a simpler `PointerWatcher` implementation (a Gnome supported implementation to monitor mouse pointer movements). Moving to this approach provides the following advantages: - switch to a Gnome supported feature to detect when mouse pointer moves to another monitor (instead of an unsupported, custom, error-prone implementation); - significantly simplifies the codebase for PaperWM's multimonitor support; - replaces around ~164 lines of (now) unneeded code with ~31 lines; - removes a complex part of multimonitor support and would allow us to add simple behaviours (based on user preference) like #389; _Note: we actually already use the `PointerWatcher` approach for multi-monitor drag/drop support - so this PR is essentially removing the other approach and adding a "activate space" method to the `PointerWatcher`._ @Lythenas and @Thesola10 - could you give this PR branch a test? I'll set it as a draft atm given it's quite a large change and I'm sure there might be some side-effects from this. @Thesola10 - I note that this may impact some of your touch signals, although, we no longer have the ClickOverlay element blocking actions so it may turn out better (just a hypothesis).
Hey @bilboquet, as you mentioned this issue is a little different - I've created a ticket for the "mouse follows focus" approaches you're referring to #756. |
Many thanks, at first that was just a comment, I'm glad you're considering it. |
So, after attempts at implementing an option for this (see PR #755) , we now understand why this isn't currently feasible with the way PaperWM manages multiple monitors (i.e. one workspace per monitor). Note that "one workspace per monitor" is a PaperWM implementation - Gnome does not natively have this (although it's been requested multiple times: https://gitlab.gnome.org/GNOME/mutter/-/issues/37). Gnome has a "one workspace across all monitors" paradigm. The reason why we can't implement this nicely, is that only one
Being unmapped impacts how windows respond (or don't respond) to various signals and events (which are needed for normal window operations). Now, this isn't a problem in vanilla Gnome since it uses one workspace across all monitors - meaning that if you've got multiple monitors, you're actually using a single workspace (i.e. all windows across monitors are mapped). PaperWM on the other hand, actually has a different workspace on each monitor. Which is why, it's always needed to To be able to implement this (not focusing windows when moving mouse to another monitor), we'd have to:
Note, from a code/development pov, Thoughts? |
Hello, First, as a disclaimer, I'm a sloppy focus lover (I had to turn it off, but anyway) so the behavior described in this issue is not a problem for me, I like it ^^. Next, I don't understand what would be the consequences (from a user point of view) of
If that does not introduce some kind of synchronization between the screens (ex: I would not like that 3 fingers swiping moves the windows on all screens) I'd say: let's go, make your dev life easier. Regardless of the solution, I think it is important to make your life as a developer easier. |
@jtaala at least I understand now why it is not possible to change that without gnome changing something. and that means, that the main concept of paperwm is not supported by gnome and the whole multi monitor thing is just a workaround. If I'm not mistaken the inactive monitors show a screen capture of the state when the mouse left the screen, right? And it has to be above all other windows. While I'm dragging a dialog to another monitor this screen capture stays below the dragged dialog. As soon as I lift the mouse button we capture a screen of the other monitor and switch the desktop. As the dialog is always on the same desktop as the main window it can not be shown anymore. I first thought it is because of the focus of the window and is just behind the other window. Another thought: when we put all dialogs on the scratch layer - would that help? but that is also weird: the dialog gets moved to another desktop when you drag it and the main window follows. that means the main window is not there when the screen is captured and it gets hidden. |
Hey @tflori - no this is not correct. They're actually windows (no screenshots are involved) - however, we're simulating an actual gnome workspace on the other monitor (which isn't possible on normal gnome as a single workspace is used across all monitors. So, basically, given we're actually linking a workspace to another monitor (again, not normal Gnome behaviour)- we need to activate the workspace as we map each of the windows to said workspace. In Gnome, since you can only have one workspace active at a time, we need to be able detect when the mouse moves to another monitor (to activate the workspace and enable windows to receive signals and work as normal. Hence, that's what happens when we move the mouse, we track mouse movements and when it move to another monitor, we activate the workspace on that monitor, which enables the windows to accept events/signals etc. |
Unfortunately, that's exactly what it would do - like normal Gnome, e.g. in normal Gnome if you drag a window from one monitor to another - it's as if it's just one large workspace (whereas in PaperWM you have a boundary and the window "moves" from one workspace to another). |
You can see how neat that is - PaperWM actually implements "separate workspaces on monitors". Although it's not without it's issues, mainly because it's not currently possible on normal Gnome and hence we're fighting against Gnome's current design. Now, we wouldn't likely change this behaviour - and just accept that we're definitely not following Gnome's design re multimonitors... and hence there's going to be some rough parts, bugs, and limits to what we can currently do when it comes to PaperWM multimonitor. |
when mouse move to another monitor, current windows from previous monitor lost focus to window on current monitor but it work normally for window in same monitor is there any solution? I tried to disabled "Make topbar follow monitor focus" but it doesn't help
The text was updated successfully, but these errors were encountered: