[Wayland-bugs] [Bug 762713] [Wayland] GDK doesn't remember unmaximized or unfullscreen size

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Tue Mar 1 07:51:26 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=762713

--- Comment #11 from Olivier Fourdan <ofourdan at redhat.com> ---
(In reply to Matthias Clasen from comment #10)
> Review of attachment 322632 [details] [review]:
> 
> ::: gdk/wayland/gdkwindow-wayland.c
> @@ +2335,2 @@
>    if (impl->display_server.xdg_surface)
>      xdg_surface_set_maximized (impl->display_server.xdg_surface);
> 
> Do we really need to save in maximize and fullscreen ? Shouldn't it be
> enough to save whenever we configure the surface with a new size ?

That was my first approach as well but that won't work because gtk+
reconfigures the window to a much larger size prior to changing its state (see
comment 3), so by saving the size in the configure function, we'd save the
wrong size.

> But you probably do need an extra save() call in sync_margin(), since the
> saved size depends on the margins ?

We save the size only when not fullscreen nor maximized, and we reuse them when
leaving that state (and only when the given size is 0x0), so even if the
margins do change while fullscreen or maximized, or even when in normal state
we don't really care, we're not using/applying them.

But more importantly, saving the size in sync_margin() does break the case
Jonas brought up in comment 7, ie a resize while hidden so I think it's better
as it is now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160301/cac75435/attachment.html>


More information about the wayland-bugs mailing list