diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-10-27 16:56:40 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-11-10 17:41:06 +0100 |
commit | a1828e8b60321c0c8951ab00029ae9cb6ab51928 (patch) | |
tree | 5e2455c9ece0ddc4b9f981601ce8da203d02c32b /gdk/win32 | |
parent | d27b402a85ccbe8252a141a086b3f810b9b14e4f (diff) | |
download | gtk+-a1828e8b60321c0c8951ab00029ae9cb6ab51928.tar.gz |
win32: Make flush/sync work like in X
gdk_flush() should gdk_display_sync() on all open displays.
Both for display_flush and display_sync it seems useful to call
GdiFlush, but we don't have anything extra to do for display_sync,
as there is no inherent roundtrip on win32.
This should close bug #84314
Diffstat (limited to 'gdk/win32')
-rw-r--r-- | gdk/win32/gdkdisplay-win32.c | 11 | ||||
-rw-r--r-- | gdk/win32/gdkevents-win32.c | 13 | ||||
-rw-r--r-- | gdk/win32/gdkprivate-win32.h | 1 |
3 files changed, 10 insertions, 15 deletions
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 74a8d666e7..31cfcadb1b 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -586,6 +586,15 @@ gdk_win32_display_flush (GdkDisplay * display) GdiFlush (); } + +static void +gdk_win32_display_sync (GdkDisplay * display) +{ + g_return_if_fail (display == _gdk_display); + + GdiFlush (); +} + static void gdk_win32_display_dispose (GObject *object) { @@ -657,7 +666,7 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass) display_class->get_screen = gdk_win32_display_get_screen; display_class->get_default_screen = gdk_win32_display_get_default_screen; display_class->beep = gdk_win32_display_beep; - display_class->sync = _gdk_win32_display_sync; + display_class->sync = gdk_win32_display_sync; display_class->flush = gdk_win32_display_flush; display_class->has_pending = _gdk_win32_display_has_pending; display_class->queue_events = _gdk_win32_display_queue_events; diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index bfb56092a9..49741666af 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -3415,16 +3415,3 @@ is_modally_blocked (GdkWindow *window) GdkWindow *modal_current = _gdk_modal_current (); return modal_current != NULL ? gdk_window_get_toplevel (window) != modal_current : FALSE; } - -void -_gdk_win32_display_sync (GdkDisplay * display) -{ - MSG msg; - - g_return_if_fail (display == _gdk_display); - - /* Process all messages currently available */ - while (PeekMessageW (&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessageW (&msg); -} - diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index cdba1eb43f..d7dae47858 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -388,7 +388,6 @@ gboolean _gdk_win32_display_supports_cursor_color (GdkDisplay *display); GList *_gdk_win32_display_list_devices (GdkDisplay *dpy); -void _gdk_win32_display_sync (GdkDisplay * display); gboolean _gdk_win32_display_has_pending (GdkDisplay *display); void _gdk_win32_display_queue_events (GdkDisplay *display); |