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

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 26 10:23:18 UTC 2016


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

--- Comment #3 from Olivier Fourdan <ofourdan at redhat.com> ---
Created attachment 322447
  --> https://bugzilla.gnome.org/attachment.cgi?id=322447&action=edit
Simple reproducer for testing purpose.

Attaching a simple reproducer that I used for another bug.

You need to take into account the margins that change when fullscreen and
maximized.

Something like that in your gdk_wayland_window_remember_size() function:

  impl->saved_width = window->width - impl->margin_left - impl->margin_right;
  impl->saved_height = window->height - impl->margin_top - impl->margin_bottom;

That fixes the issue in my case.

I reckon that's because gtk+ does change its shadow width prior to change
states (can be observed by breaking on gdk_wayland_window_set_shadow_width).

That brings us to another issue, which is as to when to save sizes because gtk+
also resize the window to something as large as the screen prior to change its
state... So the saved sizes are wrong.

-- 
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/20160226/3c651294/attachment.html>


More information about the wayland-bugs mailing list