forked from AuroraMiddleware/gtk
Merge branch 'wip/carlosg/touchpad-gesture-fixes' into 'main'
Touchpad gesture fixes See merge request GNOME/gtk!4417
This commit is contained in:
commit
6f5210afea
@ -719,14 +719,6 @@ gdk_event_queue_handle_scroll_compression (GdkDisplay *display)
|
|||||||
|
|
||||||
gdk_event_unref (old_event);
|
gdk_event_unref (old_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_queue_get_length (&display->queued_events) == 1 &&
|
|
||||||
g_queue_peek_head_link (&display->queued_events) == scrolls)
|
|
||||||
{
|
|
||||||
GdkFrameClock *clock = gdk_surface_get_frame_clock (surface);
|
|
||||||
if (clock) /* might be NULL if surface was destroyed */
|
|
||||||
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -832,14 +824,6 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
|||||||
g_queue_delete_link (&display->queued_events, pending_motions);
|
g_queue_delete_link (&display->queued_events, pending_motions);
|
||||||
pending_motions = next;
|
pending_motions = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_queue_get_length (&display->queued_events) == 1 &&
|
|
||||||
g_queue_peek_head_link (&display->queued_events) == pending_motions)
|
|
||||||
{
|
|
||||||
GdkFrameClock *clock = gdk_surface_get_frame_clock (pending_motion_surface);
|
|
||||||
if (clock) /* might be NULL if surface was destroyed */
|
|
||||||
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2244,7 +2244,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
|
|||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gulong serial)
|
gulong serial)
|
||||||
{
|
{
|
||||||
GdkSurface *event_surface;
|
GdkSurface *event_surface = NULL;
|
||||||
gboolean unlink_event = FALSE;
|
gboolean unlink_event = FALSE;
|
||||||
GdkDeviceGrabInfo *button_release_grab;
|
GdkDeviceGrabInfo *button_release_grab;
|
||||||
GdkPointerSurfaceInfo *pointer_info = NULL;
|
GdkPointerSurfaceInfo *pointer_info = NULL;
|
||||||
@ -2336,6 +2336,14 @@ _gdk_windowing_got_event (GdkDisplay *display,
|
|||||||
*/
|
*/
|
||||||
_gdk_event_queue_handle_motion_compression (display);
|
_gdk_event_queue_handle_motion_compression (display);
|
||||||
gdk_event_queue_handle_scroll_compression (display);
|
gdk_event_queue_handle_scroll_compression (display);
|
||||||
|
|
||||||
|
if (event_surface)
|
||||||
|
{
|
||||||
|
GdkFrameClock *clock = gdk_surface_get_frame_clock (event_surface);
|
||||||
|
|
||||||
|
if (clock) /* might be NULL if surface was destroyed */
|
||||||
|
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -242,7 +242,7 @@ _gtk_gesture_get_n_touchpad_points (GtkGesture *gesture,
|
|||||||
if (!priv->touchpad)
|
if (!priv->touchpad)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
data = g_hash_table_lookup (priv->points, NULL);
|
data = g_hash_table_lookup (priv->points, priv->last_sequence);
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1352,6 +1352,14 @@ handle_pointing_event (GdkEvent *event)
|
|||||||
*/
|
*/
|
||||||
device = gdk_seat_get_pointer (gdk_event_get_seat (event));
|
device = gdk_seat_get_pointer (gdk_event_get_seat (event));
|
||||||
}
|
}
|
||||||
|
else if (type == GDK_TOUCHPAD_PINCH ||
|
||||||
|
type == GDK_TOUCHPAD_SWIPE)
|
||||||
|
{
|
||||||
|
/* Another bit of a kludge, touchpad gesture sequences do not
|
||||||
|
* reflect on the pointer focus lookup.
|
||||||
|
*/
|
||||||
|
sequence = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
switch ((guint) type)
|
switch ((guint) type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user