Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37772871
en ru br
Репозитории ALT
S:3.40.0-alt2
3.0: 0.6.4-alt3
www.altlinux.org/Changes

Группа :: Разработка/GNOME и GTK+
Пакет: glade

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: glade-3.20-fix-xorg-100-percent.patch
Скачать


Author: Arnaud Rebillout <arnaud@preev.io>
Date:   Tue Jun 13 15:03:02 2017 +0700
Fix use of GTK+ style context in GladeDesignLayout.
It seems like modifying the style context in the 'draw' handler is not
recommended, and we need to save/restore the context.
Otherwise, for some widgets (GtkButton, GtkComboBox), the
GladeDesignLayout gets trapped in draw-damage loop.
See 0c076cc8828cd80f1f156a08569199675bf35165 for reference.
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c
index b5970ce..17e9a60 100644
--- a/gladeui/glade-design-layout.c
+++ b/gladeui/glade-design-layout.c
@@ -1033,13 +1033,13 @@ draw_frame (GtkWidget *widget, cairo_t *cr, gboolean selected,
   if (priv->widget_name)
     {
       GdkRectangle *rect = &priv->south_east;
-
+      gtk_style_context_save (context);
       gtk_style_context_add_class (context, "handle");
       gtk_render_background (context, cr, rect->x, rect->y, rect->width, rect->height);
       gtk_render_frame (context, cr, rect->x, rect->y, rect->width, rect->height);
       gtk_render_layout (context, cr, rect->x + OUTLINE_WIDTH, rect->y + OUTLINE_WIDTH,
                          priv->widget_name);
-      gtk_style_context_remove_class (context, "handle");
+      gtk_style_context_restore (context);
     }
 }
 
@@ -1084,6 +1084,7 @@ draw_selection (cairo_t *cr,
   if (alloc.x < 0 || alloc.y < 0) return;
 
   context = gtk_widget_get_style_context (parent);
+  gtk_style_context_save (context);
   gtk_style_context_add_class (context, "selection");
   r = color->red; g = color->green; b = color->blue;
   gtk_widget_translate_coordinates (widget, parent, 0, 0, &x, &y);
@@ -1122,7 +1123,7 @@ draw_selection (cairo_t *cr,
 
   /* Draw Selection box */
   gtk_render_frame (context, cr, x - left, y - top, w + left + right, h + top + bottom);
-  gtk_style_context_remove_class (context, "selection");
+  gtk_style_context_restore (context);
 }
 
 #define DIMENSION_OFFSET 9
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin