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 toggle by window manager does not change OS.window_fullscreen property #40007

Closed
Rubonnek opened this issue Jul 1, 2020 · 6 comments · Fixed by #62551
Closed

Fullscreen toggle by window manager does not change OS.window_fullscreen property #40007

Rubonnek opened this issue Jul 1, 2020 · 6 comments · Fixed by #62551

Comments

@Rubonnek
Copy link
Member

Rubonnek commented Jul 1, 2020

Godot version:
3.2 branch - 63fd0d3

OS/device including version:
Arch Linux

Issue description:
Toggling fullscreen mode on and off using i3 as the window manager does not update the value of OS.window_fullscreen.

I suppose this may be happening with other tiling/dynamic window managers.

Steps to reproduce:

  1. Launch any project in non-fullscreen mode.
  2. Toggle fullscreen using the window manager shortcut (usually Alt+F in i3)
  3. Check OS.is_window_fullscreen(). It returns False.

Minimal reproduction project:

fullscreen_toggle.zip

@Calinou
Copy link
Member

Calinou commented Jul 1, 2020

This is probably expected. Can the application even be aware of this? Is there any precedent of an application noticing when you use the window manager to make it fullscreen or borderless?

@Rubonnek
Copy link
Member Author

Rubonnek commented Jul 1, 2020

I believe it can be made to be aware of it. Firefox can toggle its full screen mode successfully by using its shortcut F11 and the window manager shortcut Alt+F interchangeably in any order under X11. I'm not sure how Firefox does it yet.

I haven't tested anything on wayland, but I suppose the same applies.

@rsubtil
Copy link
Contributor

rsubtil commented Jul 1, 2020

Looking at the FreeDesktop specification for _NET_WM_STATE, and in this sentence in particular:

A Client wishing to change the state of a window MUST send a _NET_WM_STATE client message to the root window (see below). The Window Manager MUST keep this property updated to reflect the current state of the window.

leads me to believe that the window manager should be sending _NET_WM_STATE_FULLSCREEN atoms to Godot

@akien-mga
Copy link
Member

I can confirm the issue on KDE / KWin too when setting Fullscreen with Right click on taskbar > More > Fullscreen.

@akien-mga akien-mga added this to the 3.5 milestone Jun 30, 2022
@akien-mga
Copy link
Member

Fixed by #62543.

@akien-mga
Copy link
Member

Still needs to be fixed in 4.0 though (I checked and it's reproducible), so let's keep this open for now.

@akien-mga akien-mga reopened this Jun 30, 2022
@akien-mga akien-mga modified the milestones: 3.5, 4.0 Jun 30, 2022
akien-mga added a commit to akien-mga/godot that referenced this issue Jun 30, 2022
Fixes godotengine#40007.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
@akien-mga akien-mga modified the milestones: 4.0, 3.5 Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants