nclarius / KWin-window-positioning-scripts

KWin scripts controlling window placement on multi-monitor setups
GNU General Public License v3.0
59 stars 14 forks source link

[Always Open on Active Screen] Windows do not actually open on active screen #2

Open Slater91 opened 2 years ago

Slater91 commented 2 years ago

Hello! I just installed the "Always open on active screen" script. Unfortunately it does not work. If I start an application, it still opens on whatever screen it pleases instead of the one the cursor is in. I have tried restarting KWin, but to no avail. It does work, however, if I click on the desktop first.

I am using two screens, both with the same resolution and vertically arranged, on X11.

The base system is KDE Neon with Plasma 5.23.2, KDE Frameworks 5.87.0 and Qt 5.15.3.

nclarius commented 2 years ago

Off the top of my head I don't know what could cause this, I assume some window behavior setting is incompatible with the script but I couldn't identify it in my tests.

Could you please tell me what you have in System Settings > Window Management > Window Behavior for the following settings:

Also, do you perhaps have any window rules (System Settings > Window Management > Window Rules) or other KWin scripts (System Settings > Window Management > KWin Scripts) that might override the screen preference?

And did logging out and in again not make the script work either?

Slater91 commented 2 years ago

A-ha, I think I got it. I had "active screen follows mouse" disabled. Enabling it does the trick. I did not know the option was there at all, to be honest! I would suggest including this in the readme for further clarity.

Thank you for your kind help and for developing this great script, it's going to be a game changer for me! Have a great day! :)

nclarius commented 2 years ago

Yes, of course. Thanks for making me aware of it!

Glad to hear you like the script, and thank you for the kind words. If you want to help spread the word you can leave a review in the KDE store.

xalt7x commented 2 years ago

@nclarius

Focus > Multiscreen behavior > Active screen follows mouse

I have another example. Without this option GIMP 2.10.28 shows splash screen on a wrong monitor but after that actual window is placed correctly. Could you please mention it in a readme somewhere? And "this option shows only when multiple screens are currently connected" as well. It could also be set at ~/.config/kwinrc

[Windows] ActiveMouseScreen=true

Anyway, thanks for making KDE Plasma better! :+1: "Always Open on Primary Screen" works out of the box but I guess most users would prefer this ("Always Open on Active Screen") script.

nclarius commented 2 years ago

@Alt37 That Active screen follows mouse has to be enabled already was in the readme, or what do you mean?
That the option is only visible when several monitors are connected and the alternative route via the config file I just added, thanks for pointing it out.

xalt7x commented 2 years ago

@nclarius Ah, sorry, I missed that it's actually on the github readme. Could you put this information at store.kde.org? Users which find this script via "Get New Scripts" need to now that as well. Thanks.

nclarius commented 2 years ago

Done.

Slater91 commented 1 year ago

Hello. I am reopening this issue as I can't get windows to open on the active screen at all on my desktop, despite trying all possible settings. I am using Plasma with X11. I can't really find any pattern to the opening on the wrong screen, it seems to be entirely random.

I have checked the settings on my laptop, where the issue is not present, and they appear to be exactly the same. The laptop has version 2.1 installed and I tried using that as well on my desktop, with no luck however. I have run out of ideas on how to find the source of this problem.

nclarius commented 1 year ago

Do you have the apps remembering positions feature turned off?

Slater91 commented 1 year ago

Sorry, I completely missed your message! Yes, it is turned off, though that introduces other issues (e.g. the size is reset every time I close and re-open some apps, though I guess that's a bug in KWin).