[mutter] display: Rewrite grab_op_should_block_wayland to be a tiny bit clearer



commit b4293d46a624f936ca527eb9bd644ac0105ab856
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Apr 12 00:19:57 2014 -0700

    display: Rewrite grab_op_should_block_wayland to be a tiny bit clearer

 src/core/display.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 9a382ab..8dba8a8 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1301,7 +1301,15 @@ meta_grab_op_is_clicking (MetaGrabOp grab_op)
 gboolean
 meta_grab_op_should_block_wayland (MetaGrabOp op)
 {
-  return (op != META_GRAB_OP_NONE && !meta_grab_op_is_clicking (op));
+  if (op == META_GRAB_OP_NONE)
+    return FALSE;
+
+  /* Clicking on a frame button needs us to deliver events to the
+   * frame window, since the button is part of the frame here. */
+  if (meta_grab_op_is_clicking (op))
+    return FALSE;
+
+  return TRUE;
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]