}
-static void
-gdk_broadway_window_enable_synchronized_configure (GdkWindow *window)
-{
- if (!GDK_IS_WINDOW_IMPL_BROADWAY (window->impl))
- return;
-}
-
-static void
-gdk_broadway_window_configure_finished (GdkWindow *window)
-{
- if (!WINDOW_IS_TOPLEVEL (window))
- return;
-}
-
static gboolean
gdk_broadway_window_beep (GdkWindow *window)
{
impl_class->set_functions = gdk_broadway_window_set_functions;
impl_class->begin_resize_drag = gdk_broadway_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_broadway_window_begin_move_drag;
- impl_class->enable_synchronized_configure = gdk_broadway_window_enable_synchronized_configure;
- impl_class->configure_finished = gdk_broadway_window_configure_finished;
impl_class->set_opacity = gdk_broadway_window_set_opacity;
impl_class->set_composited = gdk_broadway_window_set_composited;
impl_class->destroy_notify = gdk_broadway_window_destroy_notify;
* gdk_window_enable_synchronized_configure:
* @window: a toplevel #GdkWindow
*
- * Indicates that the application will cooperate with the window
- * system in synchronizing the window repaint with the window
- * manager during resizing operations. After an application calls
- * this function, it must call gdk_window_configure_finished() every
- * time it has finished all processing associated with a set of
- * Configure events. Toplevel GTK+ windows automatically use this
- * protocol.
- *
- * On X, calling this function makes @window participate in the
- * _NET_WM_SYNC_REQUEST window manager protocol.
+ * Does nothing, present only for compatiblity.
*
* Since: 2.6
+ * Deprecated: 3.8: this function is no longer needed
**/
void
gdk_window_enable_synchronized_configure (GdkWindow *window)
{
- GDK_WINDOW_IMPL_GET_CLASS (window->impl)->enable_synchronized_configure (window);
}
/**
* gdk_window_configure_finished:
* @window: a toplevel #GdkWindow
- *
- * Signal to the window system that the application has finished
- * handling Configure events it has received. Window Managers can
- * use this to better synchronize the frame repaint with the
- * application. GTK+ applications will automatically call this
- * function when appropriate.
*
- * This function can only be called if gdk_window_enable_synchronized_configure()
- * was called previously.
+ * Does nothing, present only for compatiblity.
*
* Since: 2.6
+ * Deprecated: 3.8: this function is no longer needed
**/
void
gdk_window_configure_finished (GdkWindow *window)
{
- GDK_WINDOW_IMPL_GET_CLASS (window->impl)->configure_finished (window);
}
/**
gint *new_width,
gint *new_height);
+GDK_DEPRECATED_IN_3_8
void gdk_window_enable_synchronized_configure (GdkWindow *window);
+GDK_DEPRECATED_IN_3_8
void gdk_window_configure_finished (GdkWindow *window);
GdkWindow *gdk_get_default_root_window (void);
/* FIXME: Implement */
}
-static void
-gdk_quartz_window_enable_synchronized_configure (GdkWindow *window)
-{
-}
-
-static void
-gdk_quartz_window_configure_finished (GdkWindow *window)
-{
-}
-
static void
gdk_quartz_window_destroy_notify (GdkWindow *window)
{
impl_class->set_functions = gdk_quartz_window_set_functions;
impl_class->begin_resize_drag = gdk_quartz_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_quartz_window_begin_move_drag;
- impl_class->enable_synchronized_configure = gdk_quartz_window_enable_synchronized_configure;
- impl_class->configure_finished = gdk_quartz_window_configure_finished;
impl_class->set_opacity = gdk_quartz_window_set_opacity;
impl_class->destroy_notify = gdk_quartz_window_destroy_notify;
impl_class->register_dnd = _gdk_quartz_window_register_dnd;
gdk_device_ungrab (device, timestamp);
}
-static void
-gdk_wayland_window_enable_synchronized_configure (GdkWindow *window)
-{
-}
-
-static void
-gdk_wayland_window_configure_finished (GdkWindow *window)
-{
- if (!WINDOW_IS_TOPLEVEL (window))
- return;
-
- if (!GDK_IS_WINDOW_IMPL_WAYLAND (window->impl))
- return;
-}
-
static void
gdk_wayland_window_set_opacity (GdkWindow *window,
gdouble opacity)
impl_class->set_functions = gdk_wayland_window_set_functions;
impl_class->begin_resize_drag = gdk_wayland_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_wayland_window_begin_move_drag;
- impl_class->enable_synchronized_configure = gdk_wayland_window_enable_synchronized_configure;
- impl_class->configure_finished = gdk_wayland_window_configure_finished;
impl_class->set_opacity = gdk_wayland_window_set_opacity;
impl_class->set_composited = gdk_wayland_window_set_composited;
impl_class->destroy_notify = gdk_wayland_window_destroy_notify;
return (GdkWindow*) gdk_win32_handle_table_lookup (anid);
}
-static void
-gdk_win32_window_enable_synchronized_configure (GdkWindow *window)
-{
- /* nothing - no window manager to cooperate with */
-}
-
-static void
-gdk_win32_window_configure_finished (GdkWindow *window)
-{
- /* nothing - no window manager to cooperate with */
-}
-
static void
gdk_win32_window_set_opacity (GdkWindow *window,
gdouble opacity)
impl_class->begin_resize_drag = gdk_win32_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_win32_window_begin_move_drag;
- impl_class->enable_synchronized_configure = gdk_win32_window_enable_synchronized_configure;
- impl_class->configure_finished = gdk_win32_window_configure_finished;
impl_class->set_opacity = gdk_win32_window_set_opacity;
//impl_class->set_composited = gdk_win32_window_set_composited;
impl_class->destroy_notify = gdk_win32_window_destroy_notify;
impl->toplevel->in_frame = TRUE;
- hook_surface_changed (window);
+ if (impl->toplevel->configure_counter_value != 0 &&
+ impl->toplevel->configure_counter_value_is_extended)
+ {
+ impl->toplevel->current_counter_value = impl->toplevel->configure_counter_value;
+ if ((impl->toplevel->current_counter_value % 2) == 1)
+ impl->toplevel->current_counter_value += 1;
+
+ impl->toplevel->configure_counter_value = 0;
+
+ window_pre_damage (window);
+ }
+ else
+ {
+ hook_surface_changed (window);
+ }
}
static void
unhook_surface_changed (window);
+ if (impl->toplevel->configure_counter_value != 0 &&
+ !impl->toplevel->configure_counter_value_is_extended)
+ {
+ set_sync_counter (GDK_WINDOW_XDISPLAY (window),
+ impl->toplevel->update_counter,
+ impl->toplevel->configure_counter_value);
+
+ impl->toplevel->configure_counter_value = 0;
+ }
+
if (!impl->toplevel->frame_pending)
gdk_frame_timings_set_complete (timings, TRUE);
}
emulate_move_drag (window, device, button, root_x, root_y, timestamp);
}
-static void
-gdk_x11_window_enable_synchronized_configure (GdkWindow *window)
-{
- GdkWindowImplX11 *impl;
-
- if (!GDK_IS_WINDOW_IMPL_X11 (window->impl))
- return;
-
- impl = GDK_WINDOW_IMPL_X11 (window->impl);
-
- if (!impl->use_synchronized_configure)
- {
- /* This basically means you want to do fancy X specific stuff, so
- ensure we have a native window */
- gdk_window_ensure_native (window);
-
- impl->use_synchronized_configure = TRUE;
- ensure_sync_counter (window);
- }
-}
-
-static void
-gdk_x11_window_configure_finished (GdkWindow *window)
-{
- GdkWindowImplX11 *impl;
-
- if (!WINDOW_IS_TOPLEVEL (window))
- return;
-
- impl = GDK_WINDOW_IMPL_X11 (window->impl);
- if (!impl->use_synchronized_configure)
- return;
-
-#ifdef HAVE_XSYNC
- if (!GDK_WINDOW_DESTROYED (window))
- {
- GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
- GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (window);
-
- if (toplevel && toplevel->update_counter != None &&
- GDK_X11_DISPLAY (display)->use_sync &&
- toplevel->configure_counter_value != 0)
- {
- if (toplevel->configure_counter_value_is_extended)
- {
- toplevel->current_counter_value = toplevel->configure_counter_value;
- if ((toplevel->current_counter_value % 2) == 1)
- toplevel->current_counter_value += 1;
-
- toplevel->configure_counter_value = 0;
-
- set_sync_counter (GDK_WINDOW_XDISPLAY (window),
- toplevel->extended_update_counter,
- toplevel->current_counter_value);
- }
- else
- {
- set_sync_counter (GDK_WINDOW_XDISPLAY (window),
- toplevel->update_counter,
- toplevel->configure_counter_value);
- }
- }
- }
-#endif
-}
-
static gboolean
gdk_x11_window_beep (GdkWindow *window)
{
impl_class->set_functions = gdk_x11_window_set_functions;
impl_class->begin_resize_drag = gdk_x11_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_x11_window_begin_move_drag;
- impl_class->enable_synchronized_configure = gdk_x11_window_enable_synchronized_configure;
- impl_class->configure_finished = gdk_x11_window_configure_finished;
impl_class->set_opacity = gdk_x11_window_set_opacity;
impl_class->set_composited = gdk_x11_window_set_composited;
impl_class->destroy_notify = gdk_x11_window_destroy_notify;
guint no_bg : 1; /* Set when the window background is temporarily
* unset during resizing and scaling */
guint override_redirect : 1;
- guint use_synchronized_configure : 1;
cairo_surface_t *cairo_surface;
gtk_style_context_set_background (gtk_widget_get_style_context (widget), gdk_window);
- gdk_window_enable_synchronized_configure (gdk_window);
return;
}
gdk_window = gdk_window_new (parent_window, &attributes, attributes_mask);
gtk_widget_set_window (widget, gdk_window);
- gdk_window_enable_synchronized_configure (gdk_window);
-
gtk_widget_register_window (widget, gdk_window);
context = gtk_widget_get_style_context (widget);
if (GTK_WIDGET_CLASS (gtk_window_parent_class)->configure_event)
return GTK_WIDGET_CLASS (gtk_window_parent_class)->configure_event (widget, event);
- gdk_window_configure_finished (gtk_widget_get_window (widget));
return FALSE;
}
(allocation.width == event->width &&
allocation.height == event->height))
{
- gdk_window_configure_finished (gtk_widget_get_window (widget));
return TRUE;
}
set_grip_position (window);
update_grip_visibility (window);
- gdk_window_process_updates (gdk_window, TRUE);
-
- gdk_window_configure_finished (gdk_window);
-
/* If the configure request changed, it means that
* we either:
* 1) coincidentally changed hints or widget properties