Skip to content
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

Some windows become "floating/untiled" unexpectedly after exiting native fullscreen #2477

Open
fromrealstoreals opened this issue Nov 16, 2024 · 2 comments

Comments

@fromrealstoreals
Copy link

fromrealstoreals commented Nov 16, 2024

Edit: This behaviour seems to occur with other applications too. Check comment for a better description with a video.

After exiting fullscreen on Firefox, the window sometimes starts behaving as if it were set to float despite all of my windows being set to tile. Strangely, it does not seem like Firefox is not being managed by yabai as if I switch to another space then back to the space that Firefox is in, the window tiles itself without me toggling anything. It feels like yabai doesn't recognize that Firefox isn't out of fullscreen until I switch to another space and back to the original space since yabai tiles other windows in the same space as if Firefox weren't in the space.

@fromrealstoreals
Copy link
Author

fromrealstoreals commented Nov 16, 2024

I have done some testing and have found that it might have to do with MacOS's fullscreen behaviour. I'm not sure what exactly but I was messing around with Firefox's config and set the full-screen-api.macos-native-full-screen flag to true and it seemed to fix the odd behaviour for videos (I don't think this tag applies to fullscreening Firefox using MacOS traffic lights). I found that the odd behaviour also occurs with Obsidian fullscreening.

I managed to capture the behaviour on screen recording. To show that it is still being "managed" by yabai, I use skhd to unmanage then manage the window again (also have a query below the video). Despite Obsidian being managed, it acts like floating even though it is set not to float. This was captured on Sonoma 14.7.1 (23H222).

yabai.bug.mp4

I used `yabai -m query --windows' and have extracted the portion for the Obsidian window in particular. This wasn't captured during the video but during another instance of this happening. The following was taken while the window was still in its bugged state:

{
	"id":10234,
	"pid":57672,
	"app":"Obsidian",
	"title":"Untitled - FVault - Obsidian v1.7.6",
	"scratchpad":"",
	"frame":{
		"x":-130.0000,
		"y":252.0000,
		"w":1426.0000,
		"h":861.0000
	},
	"role":"AXWindow",
	"subrole":"AXStandardWindow",
	"root-window":true,
	"display":1,
	"space":3,
	"level":0,
	"sub-level":0,
	"layer":"normal",
	"sub-layer":"normal",
	"opacity":1.0000,
	"split-type":"none",
	"split-child":"none",
	"stack-index":0,
	"can-move":true,
	"can-resize":true,
	"has-focus":false,
	"has-shadow":true,
	"has-parent-zoom":false,
	"has-fullscreen-zoom":false,
	"has-ax-reference":true,
	"is-native-fullscreen":false,
	"is-visible":true,
	"is-minimized":false,
	"is-hidden":false,
	"is-floating":false,
	"is-sticky":false,
	"is-grabbed":false
}

@fromrealstoreals fromrealstoreals changed the title Firefox becomes floating unexpectedly after exiting fullscreen Some windows become "floating unexpectedly after exiting fullscreen Nov 20, 2024
@fromrealstoreals fromrealstoreals changed the title Some windows become "floating unexpectedly after exiting fullscreen Some windows become "floating" unexpectedly after exiting fullscreen Nov 20, 2024
@fromrealstoreals
Copy link
Author

fromrealstoreals commented Dec 5, 2024

After looking into this a bit more, I realize that this may be related to this #2090; however, in my case this occurs despite using the native MacOS window controls unlike as described in the issue. I could probably use --toggle native-fullscreen rather than using the MacOS traffic lights to circumvent this but I'm not sure how this could work for things like YouTube videos. Similarly, on the off chance this is possible, I was wondering if there is any workaround or script that would automatically do --toggle native-fullscreen when I interact with things that would use native fullscreen (YouTube video fullscreen button, etc.) to avoid this weird untiling issue.

Edit: Now I'm unsure of what to do. It seems that using --toggle native-fullscreen still results in this odd untiling behaviour at random times. I'm not sure how relevant this is but I have not disabled SIP. It seems that yabai just doesn't play well with native fullscreen.

Edit 2: This isn't really a solution but it seems to be a workaround for fullscreening videos in the browser. I'm not sure if there's any equivalent for Chromium browsers but if you go into about:config in Firefox, you can set full-screen-api.macos-native-full-screen to false so that the browser doesn't use native fullscreen for videos. This doesn't apply when using the MacOS traffic lights for the actual browser itself but I never really fullscreen anything other than videos anyways. I still think this is worth looking into though. If anyone else finds better workarounds or an actual solution I would be very interested in knowing.

@fromrealstoreals fromrealstoreals changed the title Some windows become "floating" unexpectedly after exiting fullscreen Some windows become "floating/untiled" unexpectedly after exiting native fullscreen Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant