[mutter] window: Complete moving enter/leave handling here
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Complete moving enter/leave handling here
- Date: Tue, 20 May 2014 11:56:19 +0000 (UTC)
commit 550f1989ff5c7801f7c2ffdb01470e8c4f69b521
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu May 15 16:20:41 2014 -0400
window: Complete moving enter/leave handling here
src/core/events.c | 13 ++++---------
src/core/window-private.h | 1 +
src/core/window.c | 10 ++++++++++
3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 6456d9c..5813778 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -888,22 +888,17 @@ handle_input_xevent (MetaDisplay *display,
enter_event->time,
enter_event->root_x,
enter_event->root_y);
-
- if (window->type == META_WINDOW_DOCK)
- meta_window_raise (window);
}
break;
case XI_Leave:
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
break;
- if (window != NULL)
+ if (window != NULL &&
+ enter_event->mode != XINotifyGrab &&
+ enter_event->mode != XINotifyUngrab)
{
- if (window->type == META_WINDOW_DOCK &&
- enter_event->mode != XINotifyGrab &&
- enter_event->mode != XINotifyUngrab &&
- !window->has_focus)
- meta_window_lower (window);
+ meta_window_handle_leave (window);
}
break;
case XI_FocusIn:
diff --git a/src/core/window-private.h b/src/core/window-private.h
index d6c82a6..d785cdc 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -708,6 +708,7 @@ void meta_window_handle_enter (MetaWindow *window,
guint32 timestamp,
guint root_x,
guint root_y);
+void meta_window_handle_leave (MetaWindow *window);
gboolean meta_window_handle_ungrabbed_event (MetaWindow *window,
const ClutterEvent *event);
diff --git a/src/core/window.c b/src/core/window.c
index 47b9ceb..f21ad8b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7983,6 +7983,16 @@ meta_window_handle_enter (MetaWindow *window,
case G_DESKTOP_FOCUS_MODE_CLICK:
break;
}
+
+ if (window->type == META_WINDOW_DOCK)
+ meta_window_raise (window);
+}
+
+void
+meta_window_handle_leave (MetaWindow *window)
+{
+ if (window->type == META_WINDOW_DOCK && !window->has_focus)
+ meta_window_lower (window);
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]