After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710652 - GtkWindow does not honour initial gtk_window_fullscreen with wayland backend
GtkWindow does not honour initial gtk_window_fullscreen with wayland backend
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
wayland
Depends on:
Blocks:
 
 
Reported: 2013-10-22 13:58 UTC by Jack Leigh
Modified: 2015-03-07 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Widget should start fullscreen (1.23 KB, text/plain)
2013-10-22 13:58 UTC, Jack Leigh
  Details
wayland: Ensure fullscreen and maximisation states are applied on show() (7.57 KB, patch)
2013-11-05 12:45 UTC, Philip Withnall
none Details | Review
wayland: make surface fullscreen when mapping it (1.27 KB, patch)
2014-06-25 08:08 UTC, Emilio Pozuelo Monfort
none Details | Review

Description Jack Leigh 2013-10-22 13:58:28 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.
Comment 1 Philip Withnall 2013-11-05 12:45:19 UTC
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.
Comment 2 Philip Withnall 2013-11-05 12:48:47 UTC
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.
Comment 3 Matthias Clasen 2013-11-09 05:16:40 UTC
Jasper, you have been playing with window states in Wayland - care to review ?
Comment 4 Matthias Clasen 2013-11-11 14:42:21 UTC
Jasper informs me that this will be dealt with as part of xdg_shell
Comment 5 Philip Withnall 2013-11-18 11:30:11 UTC
(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.
Comment 6 Matthias Clasen 2014-04-29 00:10:22 UTC
it has landed now
Comment 7 Emilio Pozuelo Monfort 2014-06-25 08:08:47 UTC
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.
Comment 8 Matthias Clasen 2015-03-07 20:51:26 UTC
I've committed a similar patch recently