Bug 143330, support update counter spec.
Sun Jul 11 15:24:03 2004 Soeren Sandmann <sandmann@daimi.au.dk> Bug 143330, support update counter spec. * configure.in: Add check for the Sync extension * gdk/gdkwindow.h: gdk_window_enable_synchronized_configure() and gdk_window_configure_finished() * gtk/gtkwindow.c (gtk_window_move_resize): Call gdk_window_finish_configure(). * gtk/gtkwindow.c (gtk_window_realize): Automatically enable synchronized configures. * gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store current and pending counter values. * gdk/x11/gdkwindow-x11.c (gdk_window_configure_finished): New function. * gdk/x11/gdkwindow-x11.c (gdk_window_enable_synchronized_configure): New function. * gdk/x11/gdkwindow-x11.c (gdk_toplevel_x11_free_contents): Delete update counter. * gdk/x11/gdkwindow-x11.c (set_wm_protocols): Advertise _NET_WM_SYNC_REQUEST when Sync is available * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Handle _NET_WM_SYNC_REQUEST messages * gdk/x11/gdkevents-x11.c (gdk_event_translate): Save counter value for use by gdk_window_configure_finished() when receiving ConfigureNotifies. * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add use_sync flag * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Check if the XSync extension is available * gdk/x11/gdkdisplay-x11.c: Add _NET_WM_SYNC_REQUEST and _NET_WM_SYNC_REQUEST_COUNTER to list of supported atoms. * gdk/linux-fb/gdkwindow-fb.c, gdk/win32/gdkwindow-win32.c: Add stubs for enable_synchronized_configure() and configure_finished()
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
b1a704b6b8
commit
1a5e92dd61
@ -3965,6 +3965,8 @@ gtk_window_realize (GtkWidget *widget)
|
||||
attributes_mask |= (window->wmclass_name ? GDK_WA_WMCLASS : 0);
|
||||
|
||||
widget->window = gdk_window_new (parent_window, &attributes, attributes_mask);
|
||||
|
||||
gdk_window_enable_synchronized_configure (widget->window);
|
||||
|
||||
gdk_window_set_user_data (widget->window, window);
|
||||
|
||||
@ -4201,7 +4203,10 @@ gtk_window_configure_event (GtkWidget *widget,
|
||||
if (!expected_reply &&
|
||||
(widget->allocation.width == event->width &&
|
||||
widget->allocation.height == event->height))
|
||||
return TRUE;
|
||||
{
|
||||
gdk_window_configure_finished (widget->window);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we do need to resize, we do that by:
|
||||
@ -5296,6 +5301,10 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
allocation = widget->allocation;
|
||||
gtk_widget_size_allocate (widget, &allocation);
|
||||
|
||||
gdk_window_process_all_updates ();
|
||||
|
||||
gdk_window_configure_finished (widget->window);
|
||||
|
||||
/* If the configure request changed, it means that
|
||||
* we either:
|
||||
* 1) coincidentally changed hints or widget properties
|
||||
|
||||
Reference in New Issue
Block a user