From 0c13ddc0c85ed4445ff8e289387c142e0ac98c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 11 Sep 2016 22:06:25 +0200 Subject: resolve handle/grip context conflict --- src/FbWinFrame.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 2454141..012b359 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -1589,7 +1589,12 @@ int FbWinFrame::getContext(Window win, int x, int y, int last_x, int last_y, boo if (window().window() == win) return context | Keys::ON_WINDOW; // /!\ old code: handle = titlebar in motionNotifyEvent but only there ! // handle() as border ?? - if (handle().window() == win) return Keys::ON_WINDOWBORDER | Keys::ON_WINDOW; + if (handle().window() == win) { + const int px = x - this->x() - window().borderWidth(); + if (px < gripLeft().x() + gripLeft().width() || px > gripRight().x()) + return context; // one of the corners + return Keys::ON_WINDOWBORDER | Keys::ON_WINDOW; + } if (titlebar().window() == win) { const int px = x - this->x() - window().borderWidth(); if (px < label().x() || px > label().x() + label().width()) -- cgit v0.11.2