Commit 7dc96c8f authored by Michael Natterer's avatar Michael Natterer

Issue #2332 - Marching ants from one image displayed on every tab

Seems we were drawing marching ants for hidden tabs ever since the
introduction of SWM, which is both a horrible waste of CPU time, and
also makes all selections visible on all displays on GTK+ 3.x.

Implement GtkWidget::unmap() in GimpDisplayShell and stop the ants
when the shell is unmapped.

(cherry picked from commit 1d43e2ff37b863de62b0382088b50f4ee974c31a)
parent 8e6c7c10
......@@ -140,6 +140,7 @@ static void gimp_display_shell_get_property (GObject *object,
GParamSpec *pspec);
static void gimp_display_shell_unrealize (GtkWidget *widget);
static void gimp_display_shell_unmap (GtkWidget *widget);
static void gimp_display_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous);
static gboolean gimp_display_shell_popup_menu (GtkWidget *widget);
......@@ -244,6 +245,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
object_class->get_property = gimp_display_shell_get_property;
widget_class->unrealize = gimp_display_shell_unrealize;
widget_class->unmap = gimp_display_shell_unmap;
widget_class->screen_changed = gimp_display_shell_screen_changed;
widget_class->popup_menu = gimp_display_shell_popup_menu;
......@@ -978,6 +980,16 @@ gimp_display_shell_unrealize (GtkWidget *widget)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
static void
gimp_display_shell_unmap (GtkWidget *widget)
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (widget);
gimp_display_shell_selection_undraw (shell);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
static void
gimp_display_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment