Skip to content
Permalink
Browse files

Do not use non-standard tool window for minimal mode.

Based on PR #1393 which reported the non-standard tool window
created issues with accessibility tools. This patch uses a
slightly customized version of a normal window instead, only
deactivating the maximize button. This should also remove
the need for special casing for OSX.
  • Loading branch information...
hacst committed Sep 21, 2014
1 parent 5e7706a commit 47a81f7bf6830185306f8e3f2f4e54cfdceb1d1a
Showing with 11 additions and 10 deletions.
  1. +11 −10 src/mumble/MainWindow.cpp
@@ -837,19 +837,20 @@ void MainWindow::setupView(bool toggle_minimize) {
}

Qt::WindowFlags f = Qt::Window;
if (!showit && g.s.bHideFrame)
f = Qt::Window | Qt::FramelessWindowHint;
#ifndef Q_OS_MAC
else if (!showit)
f = Qt::Tool;
#else
f |= Qt::MacWindowToolBarButtonHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
#endif

if (!showit) {
if (g.s.bHideFrame) {
f |= Qt::FramelessWindowHint;
} else {
// Window should only have a system menu, title bar, minimize and close button
f |= Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint;
}
}
if (g.s.aotbAlwaysOnTop == Settings::OnTopAlways ||
(g.s.bMinimalView && g.s.aotbAlwaysOnTop == Settings::OnTopInMinimal) ||
(!g.s.bMinimalView && g.s.aotbAlwaysOnTop == Settings::OnTopInNormal))
(!g.s.bMinimalView && g.s.aotbAlwaysOnTop == Settings::OnTopInNormal)) {
f |= Qt::WindowStaysOnTopHint;
}

if (! graphicsProxyWidget())
setWindowFlags(f);

0 comments on commit 47a81f7

Please sign in to comment.
You can’t perform that action at this time.