[gtk+/wip/mir2] mir: skip windows that aren't visible
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/mir2] mir: skip windows that aren't visible
- Date: Wed, 3 Dec 2014 18:44:03 +0000 (UTC)
commit 310faf6c914967c58fa944577cd2238658e9f22a
Author: William Hua <william attente ca>
Date: Wed Dec 3 11:30:34 2014 -0500
mir: skip windows that aren't visible
gdk/mir/gdkmir-private.h | 10 +++++-----
gdk/mir/gdkmireventsource.c | 2 +-
gdk/mir/gdkmirwindowimpl.c | 15 +++++++++------
3 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/gdk/mir/gdkmir-private.h b/gdk/mir/gdkmir-private.h
index 7654e08..ca8d239 100644
--- a/gdk/mir/gdkmir-private.h
+++ b/gdk/mir/gdkmir-private.h
@@ -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__ */
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index 7e4b9d0..68b0430 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -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)
{
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 78c5111..d62a24a 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]