Mudeer icon indicating copy to clipboard operation
Mudeer copied to clipboard

Fullscreen tiling only works on Xorg (wayland limitation?)

Open CarlosEkisde opened this issue 1 year ago • 3 comments

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.

CarlosEkisde avatar Sep 09 '23 08:09 CarlosEkisde

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.

darkstego avatar Sep 12 '23 14:09 darkstego

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.

CarlosEkisde avatar Oct 24 '23 17:10 CarlosEkisde

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

darkstego avatar Oct 24 '23 20:10 darkstego

It seems is working on Plasma 6.

CarlosEkisde avatar Apr 04 '24 07:04 CarlosEkisde

[...] 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

flo333 avatar Jun 21 '24 11:06 flo333

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 avatar Jun 21 '24 16:06 darkstego

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.

darkstego avatar Jun 21 '24 21:06 darkstego

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.

flo333 avatar Jul 07 '24 09:07 flo333