You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tauri provides the tauri://resize event that can emit events when the window changes size and also (in macOS) when the app has entered/left full screen (emphasis on the past tense). But there are situations where we want to know if the window is going to leave/enter full screen (as in future).
One example for such is basically, lets say you have a header area and you want to inline the window controls into the window (a common macOS design style), we need to leave space for the window controls on the top left of the window. This space is not required in full screen as window controls are not present there. With the resize event, the current situation is that, if we toggled based on the Window#isFullScreen() property on the callback for the event, we only receive the callback after the window is done animating out of the full screen mode into the windowed view. This leads to a couple of moments where the spacing is not applied eventhough the window control is coming in.
Here is a video demo of roughly what I mean, the goal is to keep the emoji rendered aside the window controls, see how on leaving full screen we have few frames where the emoji is behind the window controls:
Screen.Recording.2023-06-08.at.12.02.48.PM.mov
Describe the solution you'd like
macOS does provide an event windowWillExitFullScreen and windowWillEnterFullScreen[reference] to NSWindowDelegates that I am pretty sure Tao implements but doesn't expose into the event system. I think a way to access this event will be cool.
Alternatives considered
Currently we internally literally override the NSWindowDelegate implementation Tao provides and add these as custom events but that is super brittle and weird.
Additional context
I think this maybe a Tao specific request and might need to be moved to that repo, but I leave it to the maintainers to decide that.
The text was updated successfully, but these errors were encountered:
It would make it so that I only have to enable set_activation_policy(tauri::ActivationPolicy::Accessory) when entering fullscreen mode and I can go back to Regular upon leaving fullscreen.
As of now if I enable the activation policy as accessory it will omit app item from the CMD+Tab menu 😞.
Describe the problem
Tauri provides the
tauri://resize
event that can emit events when the window changes size and also (in macOS) when the app has entered/left full screen (emphasis on the past tense). But there are situations where we want to know if the window is going to leave/enter full screen (as in future).One example for such is basically, lets say you have a header area and you want to inline the window controls into the window (a common macOS design style), we need to leave space for the window controls on the top left of the window. This space is not required in full screen as window controls are not present there. With the resize event, the current situation is that, if we toggled based on the
Window#isFullScreen()
property on the callback for the event, we only receive the callback after the window is done animating out of the full screen mode into the windowed view. This leads to a couple of moments where the spacing is not applied eventhough the window control is coming in.Here is a video demo of roughly what I mean, the goal is to keep the emoji rendered aside the window controls, see how on leaving full screen we have few frames where the emoji is behind the window controls:
Screen.Recording.2023-06-08.at.12.02.48.PM.mov
Describe the solution you'd like
macOS does provide an event
windowWillExitFullScreen
andwindowWillEnterFullScreen
[reference] toNSWindowDelegates
that I am pretty sure Tao implements but doesn't expose into the event system. I think a way to access this event will be cool.Alternatives considered
Currently we internally literally override the
NSWindowDelegate
implementation Tao provides and add these as custom events but that is super brittle and weird.Additional context
I think this maybe a Tao specific request and might need to be moved to that repo, but I leave it to the maintainers to decide that.
The text was updated successfully, but these errors were encountered: