Commit 1d43e2ff 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.
parent 4664fa73
......@@ -142,6 +142,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);
......@@ -237,6 +238,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;
......@@ -872,6 +874,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