From 2d27fd5981b56e8ef30ba610d952999cd9bb8007 Mon Sep 17 00:00:00 2001 From: bradleyhughes Date: Tue, 18 Jan 2005 13:31:35 +0000 Subject: [PATCH] 1. the default window functions should be set to those that cannot be changed through _MOTIF_WM_HINTS 2. fix logic in double-click shade, so that we don't try to shade if the window does not have WindowFunctionShade this fixes tracker bug 1100927 --- src/Window.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 782e9cb..dfcddd0 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -679,7 +679,12 @@ static MotifHints readMotifWMHints(Blackbox *blackbox, Window window) { if (prop->functions & MWM_FUNC_ALL) { motif.functions = AllWindowFunctions; } else { - motif.functions = NoWindowFunctions; + // default to the functions that cannot be set through + // _MOTIF_WM_HINTS + motif.functions = (WindowFunctionShade + | WindowFunctionChangeWorkspace + | WindowFunctionChangeLayer + | WindowFunctionFullScreen); if (prop->functions & MWM_FUNC_RESIZE) motif.functions |= WindowFunctionResize; @@ -3301,8 +3306,8 @@ void BlackboxWindow::buttonPressEvent(const XButtonEvent * const event) { if (frame.plate == event->window) { XAllowEvents(blackbox->XDisplay(), ReplayPointer, event->time); - } else if (frame.title == event->window - || frame.label == event->window + } else if ((frame.title == event->window + || frame.label == event->window) && hasWindowFunction(WindowFunctionShade)) { if ((event->time - lastButtonPressTime <= blackbox->resource().doubleClickInterval()) || -- 2.11.4.GIT