[gnome-boxes] Fix the ungrab label sometimes rendering wrong



commit f1f536035841fde94a3690b04ecfb4eb7a697ce2
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Feb 21 11:36:01 2013 +0100

    Fix the ungrab label sometimes rendering wrong
    
    The Spice widget is sometimes sending mouse grab changed signals
    while inside gtk_widget_size_allocate() which means any size
    alllocation changes we request are ignored. This caused the
    label rendering issue.
    
    We work around this by delaying the change to an idle.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692465

 src/display-page.vala |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index 1a706f9..38f5966 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -292,7 +292,13 @@ private class Boxes.DisplayPage: GLib.Object {
 
         this.display = display;
         display_grabbed_id = display.notify["mouse-grabbed"].connect(() => {
-            update_title ();
+            // In some cases this is sent inside size_allocate (see bug #692465)
+            // which causes the label change queue_resize to be ignored
+            // So we delay the update_title call to an idle to work around this.
+            Idle.add_full (Priority.HIGH, () => {
+                update_title ();
+                return false;
+            });
         });
         display_can_grab_id = display.notify["can-grab-mouse"].connect(() => {
             update_toolbar_visible ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]