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 780292 - window: Always sync window geometry on state change
window: Always sync window geometry on state change
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 786028 786552 788642 789948 790231 791698 792697 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-03-20 06:52 UTC by Jonas Ådahl
Modified: 2021-07-05 13:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Always sync window geometry on state change (3.05 KB, patch)
2017-03-20 06:52 UTC, Jonas Ådahl
committed Details | Review
window: For wayland clients sync window geometry on commit (1.63 KB, patch)
2017-06-14 17:26 UTC, Rui Matos
reviewed Details | Review

Description Jonas Ådahl 2017-03-20 06:52:16 UTC
This fixes a bug where the fullscreen transition in gnome-shell gets stuck when fullscreening a window that is already the size it would have if fullscreened.

It's easiest to reproduce when there are two monitors:

1. Move a maximizable and fullscreenable window to the external monitor (without shell chrome)
2. Maximize that window
3. Fullscreen that window

This will cause the fullscreen transition actor to never be unmapped. This is because a 'size-change' event is seen, triggering the fullscreen animation, but it never progresses, since 'size-changed' is never emitted.
Comment 1 Jonas Ådahl 2017-03-20 06:52:20 UTC
Created attachment 348296 [details] [review]
window: Always sync window geometry on state change

When a state changed, e.g. a window went from unfullscreen to
fullscreen, always sync the window geometry, otherwise a compositor
application (e.g. gnome-shell) might end up with an unfinished window
state transition effect.

Without always syncing, the compositor plugin will see a 'size-change'
event, as a result of the state change, but if the size didn't change,
it would never see the 'size-changed' event. If an effect, for example
gnome-shell's fullscreen effect, is triggered on 'size-change' it might
rely on the actual size change to not get stuck. This commit allows it
to have this dependency.

This fixes a bug where a fullscreen effect gets "stuck" when a window
goes fullscreen without changing the window geometry.
Comment 2 Rui Matos 2017-03-20 13:12:01 UTC
Review of attachment 348296 [details] [review]:

makes sense
Comment 3 Jonas Ådahl 2017-03-23 14:50:54 UTC
Attachment 348296 [details] pushed as 5d3e7d6 - window: Always sync window geometry on state change
Comment 4 Rui Matos 2017-06-14 17:25:44 UTC
This regressed size change animations for wayland windows.
Comment 5 Rui Matos 2017-06-14 17:26:31 UTC
Created attachment 353759 [details] [review]
window: For wayland clients sync window geometry on commit

Otherwise wayland clients size change animations don't work properly
since we are syncing the window actor geometry twice, first with the
old size and then finally with the new size when the commit arrives.
Comment 6 Rui Matos 2017-06-14 17:27:35 UTC
Hopefully this doesn't re-introduce the bug we were fixing here in the first place.
Comment 7 Jonas Ådahl 2017-06-15 05:07:19 UTC
Review of attachment 353759 [details] [review]:

::: src/core/window.c
@@ +3649,3 @@
+#ifdef HAVE_WAYLAND
+  if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
+    return (flags & META_MOVE_RESIZE_WAYLAND_RESIZE) != 0;

I think this will mean we'll call into Javascript too often. This is mostly due to us being to liberal with calling meta_window_wayland_move_resize() in src/wayland/.

Currently we'll call it on every commit for popups, and on every commit the client sets the window geometry. That is probably a bad idea.

In practice, with this, it'd mean we'd enter JS on every commit, as GTK+ sets the (same) window geometry on every commit, triggering meta_window_wayland_move_resize(), ending up here, causing the 'size-changed' signal to be emitted, ending up in windowManager.js.

To fix this, we need to make MetaWaylandXdg(Toplevel|Popup) know when to actually call move_resize(), thus teaching it about what configure-acks actually changes and/or are state-change acks. Eventually it'd be nice to redesign all of the MetaWindow state tracking to hide away display protocol differences, making every potentially asynchronous operation asynchronous in the API too, but that's for another time I guess.
Comment 8 Rui Matos 2017-08-09 08:13:38 UTC
*** Bug 786028 has been marked as a duplicate of this bug. ***
Comment 9 Florian Müllner 2017-08-21 00:18:20 UTC
*** Bug 786552 has been marked as a duplicate of this bug. ***
Comment 10 Florian Müllner 2017-10-07 17:58:35 UTC
*** Bug 788642 has been marked as a duplicate of this bug. ***
Comment 11 Florian Müllner 2017-11-06 00:31:09 UTC
*** Bug 789948 has been marked as a duplicate of this bug. ***
Comment 12 Florian Müllner 2017-11-12 08:50:06 UTC
*** Bug 790231 has been marked as a duplicate of this bug. ***
Comment 13 Rui Matos 2017-12-18 10:43:16 UTC
*** Bug 791698 has been marked as a duplicate of this bug. ***
Comment 14 Florian Müllner 2018-01-25 11:41:16 UTC
*** Bug 792697 has been marked as a duplicate of this bug. ***
Comment 15 GNOME Infrastructure Team 2021-07-05 13:48:37 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.