[gimp/gimp-2-10] Issue #2332 - Marching ants from one image displayed on every tab
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #2332 - Marching ants from one image displayed on every tab
- Date: Sun, 21 Oct 2018 22:08:27 +0000 (UTC)
commit 7dc96c8f3409895d0241b0ee1866fe0a83f47d38
Author: Michael Natterer <mitch gimp org>
Date: Mon Oct 22 00:00:59 2018 +0200
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)
app/display/gimpdisplayshell.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 96d1d87325..559d01bea5 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]