[gnome-boxes] Fix nasty flashing when clicking on toolbar



commit 493b670977e9c40b7e06f8ccd6a644c26cb579c0
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Jun 29 16:20:03 2012 +0200

    Fix nasty flashing when clicking on toolbar
    
    The spice widget is non-double-buffered, which interacts poorly with
    transparent windows. What happens in this case is that the EvenBox
    that the spice widet is inside is transparent, but its parent (the window
    is not). When drawing the window gdk believes the area under the EventBox
    is transparent, so its drawn by the window, and then not drawn as transparent
    by the EventBox. When we get to the non-double buffered spice widget
    we need to flush the current double buffer pixmap which temporarily shows
    the window background before drawing the spice contents.
    
    The fix here is to make the EventBox get a solid background. However, I don't
    believe this should be necessary. Gdk should know that the spice widgets
    window is opaque and fully covers the evenbox, so it should not have
    to paint the window background under the eventbox. I believe this should
    be fixable in Gtk+.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679144

 src/display-page.vala |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index e35dee4..67ef3da 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -87,6 +87,7 @@ private class Boxes.DisplayPage: GLib.Object {
 
     public DisplayPage () {
         event_box = new EventBox ();
+        event_box.get_style_context ().add_class ("boxes-toplevel");
         event_box.set_events (EventMask.POINTER_MOTION_MASK | EventMask.SCROLL_MASK);
         event_box.above_child = true;
         event_box.event.connect ((event) => {



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