[Xfce-bugs] [Bug 15730] high CPU usage when `Show flat buttons` is NOT selected in `Window Buttons` xfce4-panel plugin

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Jul 20 12:56:46 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15730

--- Comment #3 from howaboutsynergy <howaboutsynergy at pm.me> ---
well I applied this gtk3 patch so that all relief buttons everywhere are
actually flat (which now means `Show flat buttons` has no effect and acts like
it's always on):

```diff
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 26b7ffba38..31fd115557 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1597,10 +1597,10 @@ gtk_button_set_relief (GtkButton      *button,
   if (old_relief != relief)
     {
       context = gtk_widget_get_style_context (GTK_WIDGET (button));
-      if (relief == GTK_RELIEF_NONE)
+      //if (relief == GTK_RELIEF_NONE)
         gtk_style_context_add_class (context, GTK_STYLE_CLASS_FLAT);
-      else
-        gtk_style_context_remove_class (context, GTK_STYLE_CLASS_FLAT);
+//      else
+//        gtk_style_context_remove_class (context, GTK_STYLE_CLASS_FLAT);

       g_object_notify_by_pspec (G_OBJECT (button), props[PROP_RELIEF]);
     }
```

I can't tell if it's gtk3 issue or not, assuming it is unless xfce4-panel uses
https://developer.gnome.org/gtk3/stable/GtkButton.html#gtk-button-get-relief
and does something with the returned value which doesn't seem like it, except
in this irrelevant case:
```
  #if !GTK_CHECK_VERSION (3, 0, 0) 
        /* store the relief of the button */
        button->priv->last_relief = gtk_button_get_relief (GTK_BUTTON
(button));                                                
  #endif
```
file: `xfce4-panel/libxfce4panel/xfce-arrow-button.c`

I'll try open a gtk3 issue

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list