mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 20:51:07 +00:00
macos: short-circuit on NSEventPhaseMayBegin
We only need to send a single event in this case, so just short-circuit instead of trying to return an additional event.
This commit is contained in:
parent
478bf45320
commit
1e40033852
@ -639,15 +639,12 @@ fill_scroll_event (GdkMacosDisplay *self,
|
||||
* scrolling immediately stops.
|
||||
*/
|
||||
if (phase == NSEventPhaseMayBegin)
|
||||
{
|
||||
ret = gdk_scroll_event_new (GDK_SURFACE (surface),
|
||||
pointer,
|
||||
NULL,
|
||||
get_time_from_ns_event (nsevent),
|
||||
state,
|
||||
0.0, 0.0, TRUE);
|
||||
_gdk_event_queue_append (GDK_DISPLAY (self), g_steal_pointer (&ret));
|
||||
}
|
||||
return gdk_scroll_event_new (GDK_SURFACE (surface),
|
||||
pointer,
|
||||
NULL,
|
||||
get_time_from_ns_event (nsevent),
|
||||
state,
|
||||
0.0, 0.0, TRUE);
|
||||
|
||||
dx = [nsevent deltaX];
|
||||
dy = [nsevent deltaY];
|
||||
|
Loading…
Reference in New Issue
Block a user