Commit 9adb9741 authored by Matthias Clasen's avatar Matthias Clasen

Add a vfunc for _gdk_windowing_window_get_next_serial

parent 9635f096
......@@ -1136,7 +1136,7 @@ gdk_device_grab (GdkDevice *device,
gulong serial;
display = gdk_window_get_display (window);
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
_gdk_display_add_device_grab (display,
device,
......
......@@ -677,7 +677,7 @@ _gdk_display_enable_motion_hints (GdkDisplay *display,
if (*device_serial != 0)
{
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
/* We might not actually generate the next request, so
make sure this triggers always, this may cause it to
trigger slightly too early, but this is just a hint
......@@ -2411,3 +2411,9 @@ gdk_display_warp_device (GdkDisplay *display,
GDK_DEVICE_GET_CLASS (device)->warp (device, screen, x, y);
}
gulong
_gdk_display_get_next_serial (GdkDisplay *display)
{
return GDK_DISPLAY_GET_CLASS (display)->get_next_serial (display);
}
......@@ -173,6 +173,8 @@ struct _GdkDisplayClass
void (*before_process_all_updates) (GdkDisplay *display);
void (*after_process_all_updates) (GdkDisplay *display);
gulong (*get_next_serial) (GdkDisplay *display);
/* Signals */
void (*closed) (GdkDisplay *display,
gboolean is_error);
......@@ -218,7 +220,7 @@ GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display
void _gdk_display_pointer_info_foreach (GdkDisplay *display,
GdkDisplayPointerInfoForeach func,
gpointer user_data);
gulong _gdk_display_get_next_serial (GdkDisplay *display);
G_END_DECLS
......
......@@ -5686,8 +5686,9 @@ gdk_window_hide (GdkWindow *window)
{
GdkDevice *device = d->data;
if (_gdk_display_end_device_grab (display, device,
_gdk_windowing_window_get_next_serial (display),
if (_gdk_display_end_device_grab (display,
device,
_gdk_display_get_next_serial (display),
window,
TRUE))
gdk_device_ungrab (device, GDK_CURRENT_TIME);
......@@ -8742,7 +8743,7 @@ gdk_pointer_grab (GdkWindow * window,
display = gdk_window_get_display (window);
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
......@@ -8845,8 +8846,7 @@ gdk_keyboard_grab (GdkWindow *window,
}
display = gdk_window_get_display (window);
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
device_manager = gdk_display_get_device_manager (display);
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
......@@ -9056,7 +9056,7 @@ do_synthesize_crossing_event (gpointer data)
return FALSE;
display = gdk_window_get_display (changed_toplevel);
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
g_hash_table_iter_init (&iter, display->pointers_info);
while (g_hash_table_iter_next (&iter, &key, &value))
......
......@@ -23,6 +23,7 @@
#include "gdktypes.h"
#include "gdkdevicemanagerprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkeventtranslator.h"
#include "gdkdevice-core.h"
#include "gdkkeysyms.h"
......@@ -391,7 +392,7 @@ get_event_window (GdkEventTranslator *translator,
GdkDeviceGrabInfo *info;
gulong serial;
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
info = _gdk_display_has_device_grab (display,
GDK_DEVICE_MANAGER_CORE (device_manager)->core_keyboard,
serial);
......
......@@ -21,7 +21,8 @@
#include "gdkdevicemanager-xi2.h"
#include <gdk/gdkdeviceprivate.h>
#include "gdkdeviceprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkeventtranslator.h"
#include "gdkdevice-xi2.h"
#include "gdkkeysyms.h"
......@@ -905,7 +906,7 @@ get_event_window (GdkEventTranslator *translator,
device = g_hash_table_lookup (GDK_DEVICE_MANAGER_XI2 (translator)->id_table,
GUINT_TO_POINTER (((XIDeviceEvent *) ev)->deviceid));
serial = _gdk_windowing_window_get_next_serial (display);
serial = _gdk_display_get_next_serial (display);
info = _gdk_display_has_device_grab (display, device, serial);
if (info &&
......
......@@ -1486,8 +1486,8 @@ process_internal_connection (GIOChannel *gioc,
return TRUE;
}
gulong
_gdk_windowing_window_get_next_serial (GdkDisplay *display)
static gulong
gdk_x11_display_get_next_serial (GdkDisplay *display)
{
return NextRequest (GDK_DISPLAY_XDISPLAY (display));
}
......@@ -2753,5 +2753,6 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class)
display_class->before_process_all_updates = _gdk_x11_display_before_process_all_updates;
display_class->after_process_all_updates = _gdk_x11_display_after_process_all_updates;
display_class->get_next_serial = gdk_x11_display_get_next_serial;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment