forked from AuroraMiddleware/gtk
broadway: Support window resize/drag via touch
This commit is contained in:
parent
9223e3c25a
commit
4e8fa55827
@ -241,6 +241,10 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
display_broadway->touch_sequence_down == message->touch.sequence_id)
|
||||
display_broadway->touch_sequence_down = 0;
|
||||
|
||||
if (event_type != GDK_TOUCH_BEGIN &&
|
||||
is_first_down && _gdk_broadway_moveresize_handle_event (display, message))
|
||||
break;
|
||||
|
||||
event = gdk_event_new (event_type);
|
||||
event->touch.window = g_object_ref (window);
|
||||
event->touch.sequence = GUINT_TO_POINTER(message->touch.sequence_id);
|
||||
|
@ -1197,6 +1197,34 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
|
||||
switch (event->base.type)
|
||||
{
|
||||
case BROADWAY_EVENT_TOUCH:
|
||||
if (event->touch.touch_type == 2) /* END */
|
||||
{
|
||||
update_pos (mv_resize,
|
||||
event->touch.root_x,
|
||||
event->touch.root_y);
|
||||
|
||||
finish_drag (mv_resize);
|
||||
}
|
||||
else if (event->touch.touch_type == 1) /* UPDATE */
|
||||
{
|
||||
if (mv_resize->moveresize_window->resize_count > 0)
|
||||
{
|
||||
if (mv_resize->moveresize_pending_event)
|
||||
*mv_resize->moveresize_pending_event = *event;
|
||||
else
|
||||
mv_resize->moveresize_pending_event =
|
||||
g_memdup (event, sizeof (BroadwayInputMsg));
|
||||
|
||||
break;
|
||||
}
|
||||
update_pos (mv_resize,
|
||||
event->touch.root_x,
|
||||
event->touch.root_y);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_POINTER_MOVE:
|
||||
if (mv_resize->moveresize_window->resize_count > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user