mir: skip windows that aren't visible

This commit is contained in:
William Hua 2014-12-03 11:30:34 -05:00
parent 05de5b02cb
commit 4f19be1c82
3 changed files with 15 additions and 12 deletions

View File

@ -134,10 +134,10 @@ void _gdk_mir_print_resize_event (const MirResizeEvent *event);
void _gdk_mir_print_event (const MirEvent *event);
/* TODO: Remove once we have proper transient window support. */
GdkWindow * _gdk_mir_window_get_transient_child (GdkWindow *window,
gint x,
gint y,
gint *out_x,
gint *out_y);
GdkWindow * _gdk_mir_window_get_visible_transient_child (GdkWindow *window,
gint x,
gint y,
gint *out_x,
gint *out_y);
#endif /* __GDK_PRIVATE_MIR_H__ */

View File

@ -473,7 +473,7 @@ gdk_mir_event_source_convert_events (GdkMirEventSource *source)
x = event->event.motion.pointer_coordinates[0].x;
y = event->event.motion.pointer_coordinates[0].y;
child = _gdk_mir_window_get_transient_child (window, x, y, &x, &y);
child = _gdk_mir_window_get_visible_transient_child (window, x, y, &x, &y);
if (child && child != window)
{

View File

@ -912,11 +912,11 @@ gdk_mir_window_impl_set_transient_for (GdkWindow *window,
/* TODO: Remove once we have proper transient window support. */
GdkWindow *
_gdk_mir_window_get_transient_child (GdkWindow *window,
gint x,
gint y,
gint *out_x,
gint *out_y)
_gdk_mir_window_get_visible_transient_child (GdkWindow *window,
gint x,
gint y,
gint *out_x,
gint *out_y)
{
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
GdkWindow *child = NULL;
@ -930,7 +930,10 @@ _gdk_mir_window_get_transient_child (GdkWindow *window,
y -= window->y;
for (i = impl->transient_children; i && !child; i = i->next)
child = _gdk_mir_window_get_transient_child (i->data, x, y, out_x, out_y);
{
if (GDK_MIR_WINDOW_IMPL (GDK_WINDOW (i->data)->impl)->visible)
child = _gdk_mir_window_get_visible_transient_child (i->data, x, y, out_x, out_y);
}
if (child)
return child;