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

Fullscreen does not function properly on MacOS #4

Open
JustinKunzi opened this issue Jun 20, 2023 · 4 comments
Open

Fullscreen does not function properly on MacOS #4

JustinKunzi opened this issue Jun 20, 2023 · 4 comments

Comments

@JustinKunzi
Copy link

On a Windows 10 machine this ui functions perfectly as intended and fullscreen is exclusive and takes up the whole screen. However on MacOS (Specifically an M2 Macbook air running macOS Monterey 12.5.1) The fullscreen function does not work as intended. It simply sets the app to take up the space above the icon tray on a desktop window and does not achieve exclusive fullscreen taking up the entire screen. It's incredibly annoying as it automatically assigns a scroll bar on the side and cuts of parts of the app given the limited space. The MacOS shortcut to fullscreen doesn't do anything to fix it either. I've ensured that I've built it for the correct architecture as well and nothing seems to fix it. Is there anything that can be done to get exclusive fullscreen on MacOS?

@JustinKunzi
Copy link
Author

Figured out a loose solution. While It doesn't fix the underlying issue it does allow you to exclusive full screen the application on MacOS. By changing "decorations": to true in tauri.conf.json the original MacOS traffic lights bar comes back onto the program and allows fullscreen through the native top bar. However this makes the fullscreen button in the app nonfunctional.

@agmmnn
Copy link
Owner

agmmnn commented Jun 20, 2023

Hey, thanks for the issue. I don't have a mac to look at for this issue and I'm trying to find out if this is a tauri issue or if it requires activating some features or something. If you also attach a screenshot, it will be clearer. https://github.com/tauri-apps/tauri/issues?q=fullscreen+label%3A%22platform%3A+macOS%22+

Figured out a loose solution. While It doesn't fix the underlying issue it does allow you to exclusive full screen the application on MacOS. By changing "decorations": to true in tauri.conf.json the original MacOS traffic lights bar comes back onto the program and allows fullscreen through the native top bar. However this makes the fullscreen button in the app nonfunctional.

And yes, if this is a problem, you can temporarily disable the <Menu /> component and enable the native system titlebar with "decorations": true (and likewise moving the menu to native window menu).

@JustinKunzi
Copy link
Author

My apologies I should have been more clear including photograph examples incase others do not have a MacOS environment to test and recreate the bugs in. I've been testing different fullscreen packages and methods to change the onclick event to perhaps find a solution but to no avail so far. I will let you know if I find anything. Here is an example of the bug.
Here is the non-exclusive fullscreen that occurs when you use the ui menu bar fullscreen function:
Screen Shot 2023-06-20 at 4 31 11 PM
The app tray is still visible and it stays on a "desktop" screen as if someone just resized the window to take up the maximum amount of space available.

Here is the exclusive fullscreen that should occur when an application fullscreens. This creates and entirely new screen in which the focus is on the application only.
Screen Shot 2023-06-20 at 4 31 56 PM
Aside from my Macbook I also tried this on two different Imacs. One being an older variety still on the X86_64 platform and one new Imac with the apple silicon on MacOS Ventura the results being consistent on all platforms.
I'm still rather new to Tauri and its inner workings. Since Tauri works differently than say react and electron together do you perhaps happen to know what package/methods are used to interact with the native system API's. I'd be interested to understand how that works to better understand where the root cause of the problem may lie.

@agmmnn
Copy link
Owner

agmmnn commented Aug 1, 2023

Hey, I created new library called tauri-controls and integrated into this project, it can mimic the controls of macos (and other operating systems).

can you try version, https://github.com/agmmnn/tauri-ui/releases/tag/v0.3.0

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

2 participants