diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-03-14 05:15:16 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-03-14 05:15:16 +0000 |
commit | bc98ea9ce1884bdc4837579c4d226d227b425a52 (patch) | |
tree | 84872a7dc5739fb7f4af39970a46fd760477ee9d /gtk/gtkwindow.c | |
parent | 294cfcdb222b75d741a318e76f7c8acd0690e807 (diff) | |
download | gtk+-bc98ea9ce1884bdc4837579c4d226d227b425a52.tar.gz |
Don't resize windows when request is rejected by WM. Only use the resize
Sat Mar 14 00:03:34 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkwindow.c:
Don't resize windows when request is rejected by WM.
Only use the resize count to guess whether a Configure
event was a rejection by the WM, or a move.
* gdk/gdk.c gdk/gdktypes.h:
- Don't XDestroyWindow foreign windows (If they're a child of
one of our windows, reparent them to root and send them a WM
delete event, otherwise, just delete the GTK structure.)
Handle notification of their deletion properly.
(Made foreign windows a seperate window type to do this)
* gtk/gtkobject.c (gtk_object_set_data_full):
Call the DestroyNotify when replacing the object data.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 6b87710d00..9785a36c9e 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -718,7 +718,8 @@ gtk_window_configure_event (GtkWidget *widget, /* If the window was merely moved, do nothing */ if ((widget->allocation.width == event->width) && - (widget->allocation.height == event->height)) + (widget->allocation.height == event->height) && + (window->resize_count == 0)) return FALSE; window = GTK_WINDOW (widget); @@ -737,19 +738,7 @@ gtk_window_configure_event (GtkWidget *widget, gtk_widget_map (window->bin.child); if (window->resize_count > 0) - { - window->resize_count -= 1; - - if ((window->resize_count == 0) && - ((event->width != widget->requisition.width) || - (event->height != widget->requisition.height))) - { - window->resize_count = 1; - gdk_window_resize (widget->window, - widget->requisition.width, - widget->requisition.height); - } - } + window->resize_count -= 1; window->handling_resize = FALSE; @@ -1068,13 +1057,10 @@ gtk_real_window_move_resize (GtkWindow *window, (width < widget->requisition.width) || (height < widget->requisition.height)) { - if (window->resize_count == 0) - { - window->resize_count = 1; - gdk_window_resize (widget->window, - widget->requisition.width, - widget->requisition.height); - } + window->resize_count += 1; + gdk_window_resize (widget->window, + widget->requisition.width, + widget->requisition.height); } else { |