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 1d43e2ff37
)
This commit is contained in:
@ -140,6 +140,7 @@ static void gimp_display_shell_get_property (GObject *object,
|
|||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
|
||||||
static void gimp_display_shell_unrealize (GtkWidget *widget);
|
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,
|
static void gimp_display_shell_screen_changed (GtkWidget *widget,
|
||||||
GdkScreen *previous);
|
GdkScreen *previous);
|
||||||
static gboolean gimp_display_shell_popup_menu (GtkWidget *widget);
|
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;
|
object_class->get_property = gimp_display_shell_get_property;
|
||||||
|
|
||||||
widget_class->unrealize = gimp_display_shell_unrealize;
|
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->screen_changed = gimp_display_shell_screen_changed;
|
||||||
widget_class->popup_menu = gimp_display_shell_popup_menu;
|
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);
|
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
|
static void
|
||||||
gimp_display_shell_screen_changed (GtkWidget *widget,
|
gimp_display_shell_screen_changed (GtkWidget *widget,
|
||||||
GdkScreen *previous)
|
GdkScreen *previous)
|
||||||
|
Reference in New Issue
Block a user