]> Pileus Git - ~andy/gtk/commitdiff
Don't process configure events that just move the window, and don't resize
authorOwen Taylor <owt1@cornell.edu>
Mon, 23 Feb 1998 20:54:07 +0000 (20:54 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 23 Feb 1998 20:54:07 +0000 (20:54 +0000)
Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>

* gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
that just move the window, and don't resize it. Because we need
to make sure that a widget gets redrawn after a size_allocate -
and that only happens when the configure event changes the size
of the window. Plus, it's inefficient.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkmenu.c
gtk/gtkwindow.c

index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index e99c1f85ce2ca6d0460b683b12c18b22e182ac64..4a094fcf4a82d6a4408fb58def1602f9cfa025a6 100644 (file)
@@ -1,3 +1,11 @@
+Mon Feb 23 15:41:13 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkwidget.c gtk/gtkmenu.c: Don't process configure events
+       that just move the window, and don't resize it. Because we need
+       to make sure that a widget gets redrawn after a size_allocate -
+       and that only happens when the configure event changes the size
+       of the window. Plus, it's inefficient.
+       
 Mon Feb 23 15:45:37 1998  Marc Ewing <marc@redhat.com>
 
        * gtk/gtktoolbar.h:
index 2f1f7c347c730d9e6db08836b9116bc0132ef372..9cbd961a0b85dbb064bf284dbc5ecb6252bbbb99 100644 (file)
@@ -710,6 +710,11 @@ gtk_menu_configure (GtkWidget         *widget,
   g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
+  /* If the window was merely moved, do nothing */
+  if ((widget->allocation.width == event->width) &&
+      (widget->allocation.height == event->height))
+    return FALSE;
+
   if (GTK_MENU_SHELL (widget)->menu_flag)
     {
       GTK_MENU_SHELL (widget)->menu_flag = FALSE;
index 7c2b3534a95f4ea877453214b60024200c533d0e..a805bfc92c04589c2c30d850d893827877337d8d 100644 (file)
@@ -716,6 +716,11 @@ gtk_window_configure_event (GtkWidget         *widget,
   g_return_val_if_fail (GTK_IS_WINDOW (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
+  /* If the window was merely moved, do nothing */
+  if ((widget->allocation.width == event->width) &&
+      (widget->allocation.height == event->height))
+    return FALSE;
+
   window = GTK_WINDOW (widget);
   window->handling_resize = TRUE;