forked from AuroraMiddleware/gtk
window: Don't use set_allocation() to store cached values
The window size can be queried on widget->window directly, no need to store it in widget->allocation. This change is necessary because gtk_widget_set_allcation() is now checking invariants that assume it's called from insize gtk_widget_size_allocate() and that wasn;t the case here.
This commit is contained in:
parent
aa77cd6501
commit
97ba4b1b8e
@ -5666,7 +5666,6 @@ gtk_window_configure_event (GtkWidget *widget,
|
||||
|
||||
/*
|
||||
* If we do need to resize, we do that by:
|
||||
* - filling in widget->allocation with the new size
|
||||
* - setting configure_notify_received to TRUE
|
||||
* for use in gtk_window_move_resize()
|
||||
* - queueing a resize, leading to invocation of
|
||||
@ -5676,10 +5675,6 @@ gtk_window_configure_event (GtkWidget *widget,
|
||||
|
||||
priv->configure_notify_received = TRUE;
|
||||
|
||||
allocation.width = event->width;
|
||||
allocation.height = event->height;
|
||||
gtk_widget_set_allocation (widget, &allocation);
|
||||
|
||||
gdk_window_invalidate_rect (gtk_widget_get_window (widget), NULL, FALSE); // XXX - What was this for again?
|
||||
|
||||
_gtk_container_queue_resize (GTK_CONTAINER (widget));
|
||||
@ -7176,7 +7171,9 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
&new_geometry,
|
||||
new_flags);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
gdk_window_get_position (gdk_window, &allocation.x, &allocation.y);
|
||||
allocation.width = gdk_window_get_width (gdk_window);
|
||||
allocation.height = gdk_window_get_height (gdk_window);
|
||||
|
||||
/* handle resizing/moving and widget tree allocation
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user