forked from AuroraMiddleware/gtk
Merge branch 'wip/chergert/fix-macos-popup-events' into 'master'
macos: fix popup motion and button event delivery See merge request GNOME/gtk!2694
This commit is contained in:
commit
57ebc351a9
@ -713,29 +713,23 @@ find_surface_under_pointer (GdkMacosDisplay *self,
|
|||||||
int *y)
|
int *y)
|
||||||
{
|
{
|
||||||
GdkPointerSurfaceInfo *info;
|
GdkPointerSurfaceInfo *info;
|
||||||
GdkSurface *surface;
|
GdkMacosSurface *found;
|
||||||
|
GdkSurface *surface = NULL;
|
||||||
GdkSeat *seat;
|
GdkSeat *seat;
|
||||||
int x_tmp, y_tmp;
|
int x_tmp, y_tmp;
|
||||||
|
|
||||||
seat = gdk_display_get_default_seat (GDK_DISPLAY (self));
|
seat = gdk_display_get_default_seat (GDK_DISPLAY (self));
|
||||||
info = _gdk_display_get_pointer_info (GDK_DISPLAY (self),
|
info = _gdk_display_get_pointer_info (GDK_DISPLAY (self),
|
||||||
gdk_seat_get_pointer (seat));
|
gdk_seat_get_pointer (seat));
|
||||||
surface = info->surface_under_pointer;
|
|
||||||
|
|
||||||
if (surface == NULL)
|
if ((found = _gdk_macos_display_get_surface_at_display_coords (self,
|
||||||
|
screen_point.x,
|
||||||
|
screen_point.y,
|
||||||
|
&x_tmp,
|
||||||
|
&y_tmp)))
|
||||||
{
|
{
|
||||||
GdkMacosSurface *found;
|
g_set_object (&info->surface_under_pointer, surface);
|
||||||
|
surface = GDK_SURFACE (found);
|
||||||
found = _gdk_macos_display_get_surface_at_display_coords (self,
|
|
||||||
screen_point.x,
|
|
||||||
screen_point.y,
|
|
||||||
&x_tmp, &y_tmp);
|
|
||||||
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
surface = GDK_SURFACE (found);
|
|
||||||
info->surface_under_pointer = g_object_ref (surface);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surface)
|
if (surface)
|
||||||
|
Loading…
Reference in New Issue
Block a user