Adapt quartz device code to new ways
We will need to rename the Core implementations in X11/Quartz to not clash, later.
This commit is contained in:
		
				
					committed by
					
						
						Kristian Rietveld
					
				
			
			
				
	
			
			
			
						parent
						
							e2fea748d6
						
					
				
				
					commit
					8a9c604b8a
				
			@ -86,6 +86,7 @@ gdk_device_core_class_init (GdkDeviceCoreClass *klass)
 | 
			
		||||
  device_class->ungrab = gdk_device_core_ungrab;
 | 
			
		||||
  device_class->window_at_position = gdk_device_core_window_at_position;
 | 
			
		||||
  device_class->select_window_events = gdk_device_core_select_window_events;
 | 
			
		||||
  device_class->check_extension_events = _gdk_quartz_device_check_extension_events;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@ -303,7 +304,13 @@ static void
 | 
			
		||||
gdk_device_core_ungrab (GdkDevice *device,
 | 
			
		||||
                        guint32    time_)
 | 
			
		||||
{
 | 
			
		||||
  /* Should remain empty */
 | 
			
		||||
  GdkDeviceGrabInfo *grab;
 | 
			
		||||
 | 
			
		||||
  grab = _gdk_display_get_last_device_grab (_gdk_display, device);
 | 
			
		||||
  if (grab)
 | 
			
		||||
    grab->serial_end = 0;
 | 
			
		||||
 | 
			
		||||
  _gdk_display_device_grab_update (_gdk_display, device, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static GdkWindow *
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@
 | 
			
		||||
#ifndef __GDK_DEVICE_MANAGER_CORE_H__
 | 
			
		||||
#define __GDK_DEVICE_MANAGER_CORE_H__
 | 
			
		||||
 | 
			
		||||
#include <gdk/gdkdevicemanager.h>
 | 
			
		||||
#include <gdk/gdkdevicemanagerprivate.h>
 | 
			
		||||
 | 
			
		||||
G_BEGIN_DECLS
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -74,49 +74,6 @@ gdk_events_pending (void)
 | 
			
		||||
	  (_gdk_quartz_event_loop_check_pending ()));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
gdk_device_ungrab (GdkDevice *device,
 | 
			
		||||
                   guint32    time_)
 | 
			
		||||
{
 | 
			
		||||
  GdkDeviceGrabInfo *grab;
 | 
			
		||||
 | 
			
		||||
  grab = _gdk_display_get_last_device_grab (_gdk_display, device);
 | 
			
		||||
  if (grab)
 | 
			
		||||
    grab->serial_end = 0;
 | 
			
		||||
 | 
			
		||||
  _gdk_display_device_grab_update (_gdk_display, device, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
GdkGrabStatus
 | 
			
		||||
_gdk_windowing_device_grab (GdkDevice    *device,
 | 
			
		||||
                            GdkWindow    *window,
 | 
			
		||||
                            GdkWindow    *native,
 | 
			
		||||
                            gboolean      owner_events,
 | 
			
		||||
                            GdkEventMask  event_mask,
 | 
			
		||||
                            GdkWindow    *confine_to,
 | 
			
		||||
                            GdkCursor    *cursor,
 | 
			
		||||
                            guint32       time)
 | 
			
		||||
{
 | 
			
		||||
  g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
 | 
			
		||||
  g_return_val_if_fail (confine_to == NULL || GDK_IS_WINDOW (confine_to), 0);
 | 
			
		||||
 | 
			
		||||
  if (!window || GDK_WINDOW_DESTROYED (window))
 | 
			
		||||
    return GDK_GRAB_NOT_VIEWABLE;
 | 
			
		||||
 | 
			
		||||
  _gdk_display_add_device_grab (_gdk_display,
 | 
			
		||||
                                device,
 | 
			
		||||
                                window,
 | 
			
		||||
                                native,
 | 
			
		||||
                                GDK_OWNERSHIP_NONE,
 | 
			
		||||
                                owner_events,
 | 
			
		||||
                                event_mask,
 | 
			
		||||
                                0,
 | 
			
		||||
                                time,
 | 
			
		||||
                                FALSE);
 | 
			
		||||
 | 
			
		||||
  return GDK_GRAB_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
break_all_grabs (guint32 time)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@ -199,7 +199,7 @@ _gdk_input_window_destroy (GdkWindow *window)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_gdk_input_check_extension_events (GdkDevice *device)
 | 
			
		||||
_gdk_quartz_device_check_extension_events (GdkDevice *device)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -195,5 +195,7 @@ gboolean    _gdk_quartz_screen_get_setting              (GdkScreen   *screen,
 | 
			
		||||
                                                         const gchar *name,
 | 
			
		||||
                                                         GValue      *value);
 | 
			
		||||
 | 
			
		||||
void _gdk_quartz_device_check_extension_events (GdkDevice *device);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* __GDK_PRIVATE_QUARTZ_H__ */
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user