aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2016-07-15 14:19:42 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2016-08-27 07:34:01 (GMT)
commit08ea27de38a28cc2e9f5eab3bed094fc53d48952 (patch)
treecc27127edf8dd5867fc864825edae870130f34d1 /src/FbWinFrame.cc
parenta1d3065994daba4bb0d1b437981afff358377bd4 (diff)
downloadfluxbox-08ea27de38a28cc2e9f5eab3bed094fc53d48952.zip
fluxbox-08ea27de38a28cc2e9f5eab3bed094fc53d48952.tar.bz2
Control OnTitlebar ./. OnWindow
On concurrent shortcuts OnTitlebar implies OnWindow and was so far resolved to OnWindow while OnTitlebar is the more precise condition. This also requires to exclude buttons from the titlebar context, ie. pass the position to the getContext function on press events BUG: 1035 The patch depends on the patch to correctly resolve the tab under the mouse since we're now passing the actual subwindows around
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 3965068..2454141 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -1590,7 +1590,12 @@ int FbWinFrame::getContext(Window win, int x, int y, int last_x, int last_y, boo
1590 // /!\ old code: handle = titlebar in motionNotifyEvent but only there ! 1590 // /!\ old code: handle = titlebar in motionNotifyEvent but only there !
1591 // handle() as border ?? 1591 // handle() as border ??
1592 if (handle().window() == win) return Keys::ON_WINDOWBORDER | Keys::ON_WINDOW; 1592 if (handle().window() == win) return Keys::ON_WINDOWBORDER | Keys::ON_WINDOW;
1593 if (titlebar().window() == win) return context | Keys::ON_TITLEBAR; 1593 if (titlebar().window() == win) {
1594 const int px = x - this->x() - window().borderWidth();
1595 if (px < label().x() || px > label().x() + label().width())
1596 return context; // one of the buttons, asked from a grabbed event
1597 return context | Keys::ON_TITLEBAR;
1598 }
1594 if (label().window() == win) return context | Keys::ON_TITLEBAR; 1599 if (label().window() == win) return context | Keys::ON_TITLEBAR;
1595 // internal tabs are on title bar 1600 // internal tabs are on title bar
1596 if (tabcontainer().window() == win) 1601 if (tabcontainer().window() == win)