Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 47a81f7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/mumble/MainWindow.cpp
Expand Up @@ -837,19 +837,20 @@ void MainWindow::setupView(bool toggle_minimize) {
} }


Qt::WindowFlags f = Qt::Window; Qt::WindowFlags f = Qt::Window;
if (!showit && g.s.bHideFrame) if (!showit) {
f = Qt::Window | Qt::FramelessWindowHint; if (g.s.bHideFrame) {
#ifndef Q_OS_MAC f |= Qt::FramelessWindowHint;
else if (!showit) } else {
f = Qt::Tool; // Window should only have a system menu, title bar, minimize and close button
#else f |= Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint;
f |= Qt::MacWindowToolBarButtonHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint; }
#endif }

if (g.s.aotbAlwaysOnTop == Settings::OnTopAlways || if (g.s.aotbAlwaysOnTop == Settings::OnTopAlways ||
(g.s.bMinimalView && g.s.aotbAlwaysOnTop == Settings::OnTopInMinimal) || (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; f |= Qt::WindowStaysOnTopHint;
}


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

0 comments on commit 47a81f7

Please sign in to comment.