GNOME Bugzilla – Bug 763351
[wayland] high cpu usage on open popover
Last modified: 2016-03-09 14:07:41 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.
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.