GNOME Bugzilla – Bug 710652
GtkWindow does not honour initial gtk_window_fullscreen with wayland backend
Last modified: 2015-03-07 20:51:26 UTC
Created attachment 257850 [details] Widget should start fullscreen See attached test app. This app starts in fullscreen on X but not on weston. Subsequent toggling of fullscreen with F11 works correctly.
Created attachment 259010 [details] [review] wayland: Ensure fullscreen and maximisation states are applied on show() Previously, maximising or fullscreening a window by calling gtk_window_maximize() or gtk_window_fullscreen() before the window was mapped or shown would result in the window appearing as normal (not maximised or fullscreened) when using the Wayland backend. Change the backend to unify the implementations of maximisation and fullscreening, and to apply them when showing a window for the first time.
This fixes the immediate problem, but further work is needed on the documentation for the GTK+ and GDK fullscreening and maximisation APIs. The current behaviour on the Wayland backend is that (e.g.) calling: 1. gtk_window_fullscreen() 2. gtk_window_maximize() 3. gtk_window_unmaximize() will result in a normal window, not a fullscreened window. In other words, the states don’t stack. This is potentially in conflict with the X11 backend (I haven’t tested), and certainly isn’t mentioned in the documentation. Either the documentation needs amending to state that this is the expected behavior (which would be reasonable, I think); or the Wayland backend needs some minor refactoring so that fullscreen/maximisation/transient states are stackable. See http://wayland.freedesktop.org/docs/html/protocol-spec-interface-wl_shell_surface.html, and especially wl_shell_surface::set_toplevel, for information about how Wayland treats fullscreen, maximised and transient windows.
Jasper, you have been playing with window states in Wayland - care to review ?
Jasper informs me that this will be dealt with as part of xdg_shell
(In reply to comment #4) > Jasper informs me that this will be dealt with as part of xdg_shell Does that include tightening up the specification of what happens when one tries to fullscreen a maximised window then unfullscreen it (does it go back to being maximised, or something else), and other such situations? When’s the xdg_shell stuff going to land in GTK+? I can’t find any bugs about it.
it has landed now
Created attachment 279175 [details] [review] wayland: make surface fullscreen when mapping it This is still happening here, tested on gtk-3-12 & weston 1.5, and on gtk master & weston master. In both scenarios, the test app from comment #0 starts not-fullscreen. The attached patch, similar to the one from comment #1 but updated to work with xdg_shell, fixes the problem for gtk+ master. It's a minimal patch only fixing the fullscreen issue. If it looks reasonable to you, I could extend it for the other cases (e.g. maximize) like on the previous patch.
I've committed a similar patch recently