[gtk/wip/chergert/quartz4u: 113/142] macos: fix click through when CSD is used
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/quartz4u: 113/142] macos: fix click through when CSD is used
- Date: Tue, 23 Jun 2020 18:39:17 +0000 (UTC)
commit 051af5d730f587b658f23300e4eb4d54e5b54094
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 1 16:05:06 2020 -0700
macos: fix click through when CSD is used
gdk/macos/gdkmacostoplevelsurface.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/gdkmacostoplevelsurface.c b/gdk/macos/gdkmacostoplevelsurface.c
index bc5c398916..8407636774 100644
--- a/gdk/macos/gdkmacostoplevelsurface.c
+++ b/gdk/macos/gdkmacostoplevelsurface.c
@@ -114,7 +114,16 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
geometry.min_height = gdk_toplevel_layout_get_min_height (layout);
mask = GDK_HINT_MIN_SIZE;
- style_mask |= NSWindowStyleMaskResizable;
+ /* Only set 'Resizable' mask to get native resize zones if the window is
+ * titled, otherwise we do this internally for CSD and do not need
+ * NSWindow to do it for us. Additionally, it can mess things up when
+ * doing a window resize since it can cause mouseDown to get passed
+ * through to the next window.
+ */
+ if ((style_mask & NSWindowStyleMaskTitled) != 0)
+ style_mask |= NSWindowStyleMaskResizable;
+ else
+ style_mask &= ~NSWindowStyleMaskResizable;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]