forked from AuroraMiddleware/gtk
directfb: fix gdk_directfb_child_at
When GDK looks for the window under pointer, the gdk-directfb backend looks at windows starting from the root window to the upper window in the stack. For this, it looks at window's size and position. This patch fix the assumption that windows are always natives windows from which we can retrieve backend's private data. Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
This commit is contained in:
parent
65f7b09b39
commit
4509240d0e
@ -422,12 +422,13 @@ gdk_directfb_child_at (GdkWindow *window,
|
||||
for (list = private->children; list; list = list->next)
|
||||
{
|
||||
GdkWindowObject *win = list->data;
|
||||
gint wx, wy, ww, wh;
|
||||
|
||||
gdk_window_get_geometry (GDK_WINDOW (win), &wx, &wy, &ww, &wh, NULL);
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (win) &&
|
||||
*winx >= win->x &&
|
||||
*winx < win->x + GDK_DRAWABLE_IMPL_DIRECTFB (win->impl)->width &&
|
||||
*winy >= win->y &&
|
||||
*winy < win->y + GDK_DRAWABLE_IMPL_DIRECTFB (win->impl)->height)
|
||||
*winx >= wx && *winx < wx + ww &&
|
||||
*winy >= wy && *winy < wy + wh)
|
||||
{
|
||||
*winx -= win->x;
|
||||
*winy -= win->y;
|
||||
|
Loading…
Reference in New Issue
Block a user