darkstego / Mudeer

KDE Plasma Screen Splitting Shortcuts ideal for Ultrawide and Super-Ultrawide Monitors
MIT License
157 stars 13 forks source link

Fullscreen tiling only works on Xorg (wayland limitation?) #14

Closed CarlosEkisde closed 5 months ago

CarlosEkisde commented 1 year ago

Hi, I was trying your script since I have one of those monitors but I've observed that while fullscreen tiling works nicely on Xorg. On Wayland it will just make the window become fullscreen in the normal way, but with the window width limited to what the shortcut used intends and centered. This sound like the kind of behavior it complicates to get applied on Wayland but since I actually don't know I leave this issue here just in case.

Other window operations seem to work pretty well on wayland btw.

Thank You.

darkstego commented 1 year ago

Hi, I don't quite understand the issue you are having. Is the fullscreen prefix causing the window to always be centered even when selecting something like left half? I tried it with KDE wayland and I can't seem to replicate it on my end.

CarlosEkisde commented 10 months ago

Hi, sorry for the delay in the answer. Yes, the window only appears centered when using the fullscreen prefix. But now I realized that this problem only appears when the window I want to tile has the focus, and when another window gains it, it moves to the proper place. Unfortunately the problem reappears when the window gets focused again. But at least this script remains useful for me with this workaround.

darkstego commented 10 months ago

Unfortunately, I am unable to duplicate this issue. I am currently using Wayland and the fullscreen prefix works fine

CarlosEkisde commented 5 months ago

It seems is working on Plasma 6.

flo333 commented 2 months ago

[...] this problem only appears when the window I want to tile has the focus, and when another window gains it, it moves to the proper place. Unfortunately the problem reappears when the window gets focused again.

Hmm, I'm having the same issue on Plasma 6, Wayland, Mudeer v5.0. The tiled fullscreen window appears stretched in the recording, for some reason - in reality, it just looks like regular fullscreen (with pillarboxing). The player moves to its correct location on focus loss, but covers up the entire screen once in focus.

https://github.com/darkstego/Mudeer/assets/17793067/5448ec42-7f29-4e83-8b13-495dbe7378fd

darkstego commented 2 months ago

I haven't been able to replicate this. I tried mpv and I cannot change the behaviour even with focus.

One difference I noticed is in your example, you don't get the title bar back on the video player after you tile it to the side, where in my case, on Plasma 6 I would get the titlebar back. Maybe this is caused by the fullscreen property being set differently after moving the window. But I don't see how that behavior would be different running the same script.

darkstego commented 2 months ago

So, having thought about this some more, I think I know what might be going on. Whenever the prefix key is pressed the window that is being tiled is marked as a fullscreen window. This leads the desktop to do things like keep them above other windows and removes the titlebars. As far as I know, in KDE you can resize fullscreen windows without any problems. My guess is there is something else running that observes if the focused window is full screen and ignores or supersedes the given window geometry and forces the window to become fullsize. I am unsure what that something might be. It might be a system setting or another kwin script. I couldn't find anything on my system, but then again I am not getting this behavior.

flo333 commented 2 months ago

Thank you for the answers!

Unfortunately I don't have any other KWin scripts running, and I haven't been able to find any system settings that might affect this. The strange thing is that - intermittently - everything seems to work as intended. I'm unsure what triggers this...very strange behavior. I feel like it sometimes works correctly after waking up from sleep, but I can't really reproduce it reliably.

As a workaround, I've set the following two window rules for mpv: image

Far from ideal, but it works for now.