[gnome-builder] slider: fix input stacking for edge windows



commit b20f1d4cd216890d12775f919b599e06cb1fbad6
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jan 16 12:11:20 2016 -0800

    slider: fix input stacking for edge windows

 contrib/egg/egg-slider.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/contrib/egg/egg-slider.c b/contrib/egg/egg-slider.c
index baca145..ba68b29 100644
--- a/contrib/egg/egg-slider.c
+++ b/contrib/egg/egg-slider.c
@@ -335,15 +335,7 @@ egg_slider_size_allocate (GtkWidget     *widget,
     {
       EggSliderChild *child = g_ptr_array_index (priv->children, i);
 
-      if (gtk_widget_get_mapped (widget))
-        {
-          if (gtk_widget_get_visible (child->widget))
-            gdk_window_show (child->window);
-          else
-            gdk_window_hide (child->window);
-        }
-
-      if (gtk_widget_get_realized (child->widget))
+      if (gtk_widget_get_mapped (child->widget))
         {
           GtkAllocation window_allocation;
           GtkAllocation child_allocation;
@@ -356,6 +348,10 @@ egg_slider_size_allocate (GtkWidget     *widget,
                                   window_allocation.width,
                                   window_allocation.height);
 
+          /* raise the window edges */
+          if (child->position != EGG_SLIDER_NONE)
+            gdk_window_show (child->window);
+
           gtk_widget_size_allocate (child->widget, &child_allocation);
         }
     }
@@ -563,8 +559,7 @@ egg_slider_realize (GtkWidget *widget)
   gtk_widget_set_realized (widget, TRUE);
 
   window = gtk_widget_get_parent_window (widget);
-  gtk_widget_set_window (widget, window);
-  g_object_ref (window);
+  gtk_widget_set_window (widget, g_object_ref (window));
 
   for (i = 0; i < priv->children->len; i++)
     {


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