mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
Don't process configure events that just move the window, and don't resize
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.
This commit is contained in:
parent
7add75fba5
commit
d3607d5465
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -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>
|
Mon Feb 23 15:45:37 1998 Marc Ewing <marc@redhat.com>
|
||||||
|
|
||||||
* gtk/gtktoolbar.h:
|
* gtk/gtktoolbar.h:
|
||||||
|
@ -710,6 +710,11 @@ gtk_menu_configure (GtkWidget *widget,
|
|||||||
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
|
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
|
||||||
g_return_val_if_fail (event != NULL, 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)
|
if (GTK_MENU_SHELL (widget)->menu_flag)
|
||||||
{
|
{
|
||||||
GTK_MENU_SHELL (widget)->menu_flag = FALSE;
|
GTK_MENU_SHELL (widget)->menu_flag = FALSE;
|
||||||
|
@ -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 (GTK_IS_WINDOW (widget), FALSE);
|
||||||
g_return_val_if_fail (event != NULL, 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 = GTK_WINDOW (widget);
|
||||||
window->handling_resize = TRUE;
|
window->handling_resize = TRUE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user