mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
macos: Retrieve NSEvents based on event properties
We cannot depend on the exact event, since some events (e.g. for popups) are rewritten. Therefore we need to determine the NSEvent based on heuristics. The usual suspects are event type, device and timestamp. This allows us to fix IMContext for popups.
This commit is contained in:
parent
60ddf7c421
commit
4fd848c9de
@ -998,7 +998,9 @@ _gdk_macos_display_get_nsevent (GdkEvent *event)
|
||||
{
|
||||
const GdkToNSEventMap *map = iter->data;
|
||||
|
||||
if (map->gdk_event == event)
|
||||
if (map->gdk_event->event_type == event->event_type &&
|
||||
map->gdk_event->device == event->device &&
|
||||
map->gdk_event->time == event->time)
|
||||
return map->nsevent;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user