forked from AuroraMiddleware/gtk
gtkmain forgot a return value.
few fixes with resizing behaviour and non opaque moves where configure events would exceed te number of calls to gdk_window_resize. -timj
This commit is contained in:
parent
623f7d9772
commit
a589338a7f
@ -928,7 +928,7 @@ gtk_input_add_interp (gint source,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
{
|
||||
gdk_input_add_full (source, condition, NULL, callback, data);
|
||||
return gdk_input_add_full (source, condition, NULL, callback, data);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -715,25 +715,27 @@ gtk_window_configure_event (GtkWidget *widget,
|
||||
!GTK_WIDGET_MAPPED (window->bin.child))
|
||||
gtk_widget_map (window->bin.child);
|
||||
|
||||
window->resize_count -= 1;
|
||||
if (window->resize_count == 0)
|
||||
if (window->resize_count > 1)
|
||||
window->resize_count -= 1;
|
||||
else
|
||||
{
|
||||
if ((event->width != widget->requisition.width) ||
|
||||
(event->height != widget->requisition.height))
|
||||
if ((window->auto_shrink &&
|
||||
((event->width != widget->requisition.width) ||
|
||||
(event->height != widget->requisition.height))) ||
|
||||
(event->width < widget->requisition.width) ||
|
||||
(event->height < widget->requisition.height))
|
||||
{
|
||||
window->resize_count += 1;
|
||||
window->resize_count = 1;
|
||||
gdk_window_resize (widget->window,
|
||||
widget->requisition.width,
|
||||
widget->requisition.height);
|
||||
}
|
||||
else
|
||||
window->resize_count = 0;
|
||||
}
|
||||
else if (window->resize_count < 0)
|
||||
{
|
||||
window->resize_count = 0;
|
||||
}
|
||||
|
||||
|
||||
window->handling_resize = FALSE;
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1057,7 +1059,7 @@ gtk_real_window_move_resize (GtkWindow *window,
|
||||
{
|
||||
if (window->resize_count == 0)
|
||||
{
|
||||
window->resize_count += 1;
|
||||
window->resize_count = 1;
|
||||
gdk_window_resize (widget->window,
|
||||
widget->requisition.width,
|
||||
widget->requisition.height);
|
||||
|
@ -47,7 +47,7 @@ struct _GtkWindow
|
||||
GtkWidget *focus_widget;
|
||||
GtkWidget *default_widget;
|
||||
|
||||
gshort resize_count;
|
||||
gushort resize_count;
|
||||
guint need_resize : 1;
|
||||
guint allow_shrink : 1;
|
||||
guint allow_grow : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user