Bug 463984 - On dual monitor, remember and open window where the mouse is
Summary: On dual monitor, remember and open window where the mouse is
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-08 01:22 UTC by Rajinder Yadav
Modified: 2023-01-10 21:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajinder Yadav 2023-01-08 01:22:27 UTC
For a dual monitor setup, use the mouse as context to determine where a windows should open.
Also remember its window size and placement on that monitor.

Just makes sense to open a window where the mouse in on a given monitor. Why make the user travel all the way to the otherside just to grag the new window to the other monitor.

Use case: I had a dual monitor setup, but also share the main screen with my laptop. When I am working on my laptop. I use the KVM switch to change keyboard focus and go to the other screen to open/do something quickly. However if I try to open something say like dolphin, it will mostly open in the main screen which is not visible. Since it's being used by a different computer.
Comment 1 Rajinder Yadav 2023-01-08 01:23:40 UTC
When is this dual monitor and window sizing, placement finally going to get fixed? Can 2023 be the year :) 🙏🏽🙏🏽🙏🏽
Comment 2 Natalie Clarius 2023-01-08 01:55:12 UTC
So do you want to new windows to open

- under the mouse cursor? This option already exists in Window Behavior settings.

or

- where they were last opened? This is https://bugs.kde.org/show_bug.cgi?id=15329. Or what else do you mean by "remember"?
Comment 3 Nate Graham 2023-01-09 21:57:51 UTC
.
Comment 4 Natalie Clarius 2023-01-09 22:16:02 UTC
In addition you'll probably want to enable Window Behavior's "Active Screen Follows Mouse" (on by default), which will make new windows open on the monitor where the mouse cursor is, rather than where the currently focused window is.
Comment 5 Rajinder Yadav 2023-01-10 08:08:37 UTC
OK I did the following:

I went to Settings > Window behaviour > Advanced Tab
I selected "Window placement" as "Under mouse"
I unchecked "Allow app to remember the position ..."
I unchecked "Hide utility windows for inactive..."
Hit apply.

But discovered another annoying problem. In the past (for me), windows size + position were not working! So I went to a given windows titlebar then right clicked and selected: 

1. More Action
1. Config special Window setting (or)
1. Config special Application setting (or)

Now I have to remove all these rules. I mean this windows placement, size is a complete mess and a birds nest :-D haha, I'm sure something else will break or stop working with respect to windows size, placement.

Now I need to ask. I have several browsers window opens, with size+position, and on different monitors + virtual desktop. What happens now? The system will remember, because this is currently broken for me, and kind of works. The virtual desktop might be remember, but size, position, monitor will not.

As for your other question: "So do you want to new windows to open"

Just treat each monitor as it's own desktop, make it work like a single monitor desktop.
Whereever the mouse is, the monitor+desktop will remember its own postion and size for a window being opened. If it's a windows first time being opened there, just open it in the center or follow the setting rules. (Let me know if make sense).
Comment 6 Rajinder Yadav 2023-01-10 08:13:22 UTC
Broken for brave browser, I removed its special win/position and size. Doesn't follow my mouse to open new browser window.
It might be a Brave/Chorme thing, as I believe it remembers the last browser with the focus and then opens the window there, not sure if KDE should be able to override this or I need to open a bug with chrome to respect KDE placement rules?
Comment 7 Rajinder Yadav 2023-01-10 08:19:38 UTC
Same problem with Libre Open office XCala, and guessing many more apps (OBS). So this KDE window placement it definitely broken and doesn't work as I would expect.
Comment 8 Nate Graham 2023-01-10 21:57:43 UTC
On X11, windows are allowed to determine their own placement. So if you're using X11, this is unfixable at the KWin level and it's a whole bunch of app bugs.

On Wayland, windows are not allowed to determine their own placement; the window manager rules all. The feature request for having KWin remember their positions is Bug 15329.

Either way, I think there is nothing KDE can do to fix these issues for you.