From ec4a6c4a5fea5b88dfece0a9330f4150626f3df2 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Sun, 21 Nov 2010 20:46:14 +0100 Subject: [PATCH] [broadway] Implement _gdk_windowing_window_at_device_position --- gdk/broadway/gdkwindow-broadway.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c index 0158b4df9e..ac636322d9 100644 --- a/gdk/broadway/gdkwindow-broadway.c +++ b/gdk/broadway/gdkwindow-broadway.c @@ -841,7 +841,25 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display, GdkModifierType *mask, gboolean get_toplevel) { - return NULL; + GdkWindow *window; + GdkWindowObject *private; + GdkDisplayBroadway *display_broadway; + GdkScreen *screen; + + display_broadway = GDK_DISPLAY_BROADWAY (display); + screen = gdk_display_get_screen (display, 0); + window = _gdk_window_find_child_at (gdk_screen_get_root_window (screen), + display_broadway->last_x, + display_broadway->last_y); + + if (window != NULL) + { + private = (GdkWindowObject *)window; + *win_x = display_broadway->last_x - private->x; + *win_y = display_broadway->last_y - private->y; + } + + return window; } static GdkEventMask