[mutter/wip/frame-synchronization: 113/121] MetaWindow: always resize the frame first when we have synchronization
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/frame-synchronization: 113/121] MetaWindow: always resize the frame first when we have synchronization
- Date: Wed, 30 Jan 2013 20:49:44 +0000 (UTC)
commit 7a9663500ea816b14eb708c930a705e9c4ba9a87
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Oct 3 23:10:56 2012 -0400
MetaWindow: always resize the frame first when we have synchronization
Resizing the frame triggers creation of a new backing pixmap for the
window, so we should do that first before we resize the client window
and mess up the contents of the old backing pixmap.
https://bugzilla.gnome.org/show_bug.cgi?id=685463
src/core/window.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index c332e60..60bfa91 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5051,12 +5051,28 @@ meta_window_move_resize_internal (MetaWindow *window,
* efficiently as possible
*/
- /* configure frame first if we grow more than we shrink
+ /* Normally, we configure the frame first depending on whether
+ * we grow the frame more than we shrink. The idea is to avoid
+ * messing up the window contents by having a temporary situation
+ * where the frame is smaller than the window. However, if we're
+ * cooperating with the client to create an atomic frame upate,
+ * and the window is redirected, then we should always update
+ * the frame first, since updating the frame will force a new
+ * backing pixmap to be allocated, and the old backing pixmap
+ * will be left undisturbed for us to paint to the screen until
+ * the client finishes redrawing.
*/
- size_dx = w - window->rect.width;
- size_dy = h - window->rect.height;
+ if (window->extended_sync_request_counter)
+ {
+ configure_frame_first = TRUE;
+ }
+ else
+ {
+ size_dx = w - window->rect.width;
+ size_dy = h - window->rect.height;
- configure_frame_first = (size_dx + size_dy >= 0);
+ configure_frame_first = size_dx + size_dy >= 0;
+ }
if (use_static_gravity)
meta_window_set_gravity (window, StaticGravity);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]