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

Window size setting requests not being ignored while in full screen #2862

Open
hyuri opened this issue Sep 20, 2024 · 4 comments
Open

Window size setting requests not being ignored while in full screen #2862

hyuri opened this issue Sep 20, 2024 · 4 comments
Labels
bug A crash or error in behavior. macOS The issue relates to Apple macOS support.

Comments

@hyuri
Copy link

hyuri commented Sep 20, 2024

Describe the bug

My app has multiple pages. Two of them set a specific window size. When I go into full screen, go to another page and come back, Toga still applies the size requested by the page, drawing it small from screen lower-left over a black background.

Shouldn't Toga ignore the size setting if the app/window is in full screen?

Edit: If I switch to another app (Command + Tab) and back, the issue is no longer present — meaning: the page fills the full screen again.

Proof-of-concept app capturing the issue:
FullScreenResizeIssue - Hyuri.zip

Possibly Related:

When I enter full screen using the green window button (macOS) and check app.is_full_screen and window.full_screen, both report False.
If I enter full screen by setting window.full_screen = True, window.full_screen does report True, while app.is_full_screen still reports False.

Steps to reproduce

  1. Have a page that sets a window size
  2. Go into full screen, using the green window button
  3. Go to another page
  4. Come back to the page that sets a window size
  5. See issue

Expected behavior

Toga should ignore window size setting when app/window is in full screen.

Screenshots

image

Screen recording showing the issue:
video

__

Environment

  • Operating System: macOS 13.6.9
  • Python version: 3.12.5
  • Software versions:
    • Briefcase: 0.3.19
    • Toga: 0.4.7

Logs

No response

Additional context

Related to the lower-left alignment aspect:

Is macOS using a flipped coordinate system? Seems to be the case considering the error above shows the page apparently being drawn from a lower-left origin, so maybe why #2855 is happening?

@hyuri hyuri added the bug A crash or error in behavior. label Sep 20, 2024
@freakboy3742
Copy link
Member

I'm not able to reproduce the problem you're describing - but I'm not sure if that's because I'm misunderstanding your description of the problem. In particular, there's a difference between "full screen" (maximized) on a window, and "full screen" presentation mode on the app; I haven't been able to reproduce the behaviour your describe with either - but app-level presentation mode, I also don't have the ability to switch to a different workspace.

It's always a lot more helpful to have a proof-of-concept app, rather than a word description of a problem; that makes it a lot easier to triage a problem, as we can start with a "not working" case, rather than trying to work out how to manufacture one. If you can provide a worked example of this behavior, I can take another look and see what is going on.

Regarding the specific question about macOS coordinate systems - yes, macOS's default coordinate system puts 0,0 at the bottom left of the screen; however, that's unlikely to be the cause of what is going on here. It definitely impacts how the window is displayed, but it shouldn't be altering the resize behavior.

@freakboy3742 freakboy3742 added macOS The issue relates to Apple macOS support. awaiting details More details are needed before the issue can be triaged. labels Sep 20, 2024
@hyuri
Copy link
Author

hyuri commented Sep 21, 2024

Here you go:
FullScreenResizeIssue - Hyuri.zip

I've also add it to the original report.

Also: I forgot to mention that when I switch to another app and switch back, the issue is resolved — the window now fills the full screen again.
I've updated the description to include that info.

@hyuri
Copy link
Author

hyuri commented Sep 21, 2024

I've attached a screen recording, showing the issue, to the original report.

@freakboy3742
Copy link
Member

Ok - I can confirm I can reproduce the problem with the provided code. Some more debugging is required to determine why the "non maximized" window size is being applied when the window isn't maximised.

@freakboy3742 freakboy3742 removed the awaiting details More details are needed before the issue can be triaged. label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. macOS The issue relates to Apple macOS support.
Projects
None yet
Development

No branches or pull requests

2 participants