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 587255 - _NET_WM_FREEZE_UPDATES: allow a client to freeze updates
_NET_WM_FREEZE_UPDATES: allow a client to freeze updates
Status: RESOLVED DUPLICATE of bug 685463
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 615120 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-29 01:24 UTC by Owen Taylor
Modified: 2012-10-04 03:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove unused public window-property functions (7.35 KB, patch)
2009-06-29 01:24 UTC, Owen Taylor
accepted-commit_now Details | Review
Add META_PROP_VALUE_EXISTS (6.73 KB, patch)
2009-06-29 01:24 UTC, Owen Taylor
reviewed Details | Review
_NET_WM_FREEZE_UPDATES: allow a client to freeze updates (13.67 KB, patch)
2009-06-29 01:24 UTC, Owen Taylor
none Details | Review
Remove unused public window-property functions (7.38 KB, patch)
2012-07-13 23:29 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Owen Taylor 2009-06-29 01:24:19 UTC
This patch is intended to fix problems with newly mapped
override-redirect window showing up with garbage, as well
as adding a general facility that could be used for other
things later.

(The first two patches lay the groundwork, the third adds
the feature.)

See bug 587247 for a GTK+ patch that sets _NET_WM_FREEZE_UPDATES
on newly mapped windows, and more detailed discussion of the
approach.
Comment 1 Owen Taylor 2009-06-29 01:24:24 UTC
Created attachment 137530 [details] [review]
Remove unused public window-property functions

Simplify the set of window-property functions to remove the
unused functions:

 meta_window_reload_properties_from_xwindow()
 meta_window_reload_properties()

And to make:

 meta_window_reload_property()

static. The code is considerably simplified by removing the
plural variants.
Comment 2 Owen Taylor 2009-06-29 01:24:27 UTC
Created attachment 137531 [details] [review]
Add META_PROP_VALUE_EXISTS

An existence-only property can be used by the client to signal
a state with the advantages that:

 - it is safe against race conditions as the window mapped.
   (since we can query it after selecting for notification)
 - there are no round-trips for subsequent updates, since
   XPropertyEvent.state will be PropertyNewValue or PropertyDelete

Noticing PropertyDelete also gives a not-very-important optimization
for other properties.
Comment 3 Owen Taylor 2009-06-29 01:24:29 UTC
Created attachment 137532 [details] [review]
_NET_WM_FREEZE_UPDATES: allow a client to freeze updates

Support a new client property _NET_WM_FREEZE_UPDATES which means
"don't update this window until I delete the property"

The primary purpose of this (for now) is to prevent showing garbage
when an override-window has been mapped but not yet redrawn.

 * window-props.c: Add support for reading the property intially
   and later.

 * window-private.h window.c: Add flags for the two reasons that
   updates could be frozen (resizes and client request), and add
   meta_window_updates_are_frozen() to check whether updates
   are frozen so the compositor can get its initial state.

 * Rename mutter_compositor_set_updates() to
   mutter_compositor_set_updates_frozen() to avoid having reversed

 * Implement update freezing in the Clutter-based compositor

 * Hide the shadow when contents aren't yet available so that a
   newly mapped menu doesn't show up as a tiny shadow before
   drawing properly.

As currently implemented, a downside is that when a window is shown
with no contents yet the actor will be shown, causing the
scene to be redrawn with the invisible actor, and delaying the
time when we redraw with the real contents. It would be better
to hold off on showing the actor (and starting any effects) until
contents become available.
Comment 4 Tomas Frydrych 2009-07-10 10:49:28 UTC
This both makes good sense to me and looks good; no objection to committing this.
Comment 5 Tomas Frydrych 2009-08-01 06:40:08 UTC
Owen, I think the first two patches should be committed regardless of what will happen with the _NET_WM_FREEZE_UPDATES proposal.
Comment 6 Owen Taylor 2010-04-13 13:02:48 UTC
*** Bug 615120 has been marked as a duplicate of this bug. ***
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-03-18 02:24:42 UTC
Is this something that we still need/want?
Comment 8 Jasper St. Pierre (not reading bugmail) 2012-03-18 02:26:02 UTC
Review of attachment 137530 [details] [review]:

Surprisingly, this still applies and makes for a good cleanup.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-07-13 23:29:49 UTC
Created attachment 218773 [details] [review]
Remove unused public window-property functions

Simplify the set of window-property functions to remove the
unused functions:

 meta_window_reload_properties_from_xwindow()
 meta_window_reload_properties()

And to make:

 meta_window_reload_property()

static. The code is considerably simplified by removing the
plural variants.
Comment 10 Owen Taylor 2012-10-04 03:33:28 UTC
Comment on attachment 137532 [details] [review]
_NET_WM_FREEZE_UPDATES: allow a client to freeze updates

Obsoleted by more complete work on frame synchronization
Comment 11 Owen Taylor 2012-10-04 03:42:02 UTC
Comment on attachment 218773 [details] [review]
Remove unused public window-property functions

I'll take Jasper rebasing and reattaching this as an "accepted commit now",
and pushed it so I could dup the bug on my frame synchronization work once
I file that.

Attachment 218773 [details] pushed as c02e1b6 - Remove unused public window-property functions
Comment 12 Owen Taylor 2012-10-04 03:47:07 UTC
Marking as a duplicate of a newly file patchset implementing a more recent proposal from my about how this should work - not just getting atomic updates working, but also getting compositor <-> application synchronization in place.

*** This bug has been marked as a duplicate of bug 685463 ***