forked from AuroraMiddleware/gtk
Remove an unused function
_gdk_make_event was not used anywhere.
This commit is contained in:
parent
f111e3f467
commit
106dd75b3b
@ -322,10 +322,6 @@ GdkSurface * _gdk_surface_find_descendant_at (GdkSurface *toplevel,
|
||||
double *found_x,
|
||||
double *found_y);
|
||||
|
||||
GdkEvent * _gdk_make_event (GdkSurface *surface,
|
||||
GdkEventType type,
|
||||
GdkEvent *event_in_queue,
|
||||
gboolean before_event);
|
||||
gboolean _gdk_surface_event_parent_of (GdkSurface *parent,
|
||||
GdkSurface *child);
|
||||
|
||||
|
104
gdk/gdksurface.c
104
gdk/gdksurface.c
@ -3709,110 +3709,6 @@ gdk_surface_get_support_multidevice (GdkSurface *surface)
|
||||
return surface->support_multidevice;
|
||||
}
|
||||
|
||||
/* send motion events if the right buttons are down */
|
||||
|
||||
GdkEvent *
|
||||
_gdk_make_event (GdkSurface *surface,
|
||||
GdkEventType type,
|
||||
GdkEvent *event_in_queue,
|
||||
gboolean before_event)
|
||||
{
|
||||
GdkEvent *event = gdk_event_new (type);
|
||||
guint32 the_time;
|
||||
GdkModifierType the_state;
|
||||
|
||||
the_time = gdk_event_get_time (event_in_queue);
|
||||
gdk_event_get_state (event_in_queue, &the_state);
|
||||
|
||||
event->any.surface = g_object_ref (surface);
|
||||
event->any.send_event = FALSE;
|
||||
if (event_in_queue && event_in_queue->any.send_event)
|
||||
event->any.send_event = TRUE;
|
||||
|
||||
switch ((guint) type)
|
||||
{
|
||||
case GDK_MOTION_NOTIFY:
|
||||
event->motion.time = the_time;
|
||||
event->motion.axes = NULL;
|
||||
event->motion.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
event->button.time = the_time;
|
||||
event->button.axes = NULL;
|
||||
event->button.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_UPDATE:
|
||||
case GDK_TOUCH_END:
|
||||
case GDK_TOUCH_CANCEL:
|
||||
event->touch.time = the_time;
|
||||
event->touch.axes = NULL;
|
||||
event->touch.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_SCROLL:
|
||||
event->scroll.time = the_time;
|
||||
event->scroll.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
event->key.time = the_time;
|
||||
event->key.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
event->crossing.time = the_time;
|
||||
event->crossing.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_PROXIMITY_IN:
|
||||
case GDK_PROXIMITY_OUT:
|
||||
event->proximity.time = the_time;
|
||||
break;
|
||||
|
||||
case GDK_DRAG_ENTER:
|
||||
case GDK_DRAG_LEAVE:
|
||||
case GDK_DRAG_MOTION:
|
||||
case GDK_DROP_START:
|
||||
event->dnd.time = the_time;
|
||||
break;
|
||||
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
event->touchpad_swipe.time = the_time;
|
||||
event->touchpad_swipe.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_TOUCHPAD_PINCH:
|
||||
event->touchpad_pinch.time = the_time;
|
||||
event->touchpad_pinch.state = the_state;
|
||||
break;
|
||||
|
||||
case GDK_FOCUS_CHANGE:
|
||||
case GDK_CONFIGURE:
|
||||
case GDK_DELETE:
|
||||
case GDK_DESTROY:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (event_in_queue)
|
||||
{
|
||||
if (before_event)
|
||||
_gdk_event_queue_insert_before (gdk_surface_get_display (surface), event_in_queue, event);
|
||||
else
|
||||
_gdk_event_queue_insert_after (gdk_surface_get_display (surface), event_in_queue, event);
|
||||
}
|
||||
else
|
||||
_gdk_event_queue_append (gdk_surface_get_display (surface), event);
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_display_set_surface_under_pointer (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
|
Loading…
Reference in New Issue
Block a user