After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763351 - [wayland] high cpu usage on open popover
[wayland] high cpu usage on open popover
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkPopover
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-03-09 01:24 UTC by Marinus Schraal
Modified: 2016-03-09 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marinus Schraal 2016-03-09 01:24:50 UTC
Any gtk+ application having a popup open jacks up the cpu usage. Looking at the inspector there are continuous draw calls. This problem seems to be wayland specific.
Comment 1 Matthias Clasen 2016-03-09 13:46:21 UTC
This makes the constant redrawing of the entire window go away, with no obvious ill effects. I still see some full-window redraws while interacting with the popover that should not be necessary, but the main problem is fixed with this.


diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f5cf1ba..a2be09d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7655,6 +7655,9 @@ gtk_window_configure_event (GtkWidget         *widget,
   if (!_gtk_widget_is_toplevel (widget))
     return FALSE;
 
+  if (_gtk_widget_get_window (widget) != event->window)
+    return TRUE;
+
   /* If this is a gratuitous ConfigureNotify that's already
    * the same as our allocation, then we can fizzle it out.
    * This is the case for dragging windows around.