[Libreoffice-commits] core.git: vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Feb 13 17:24:58 UTC 2019
vcl/qt5/Qt5Frame.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit dc32f930ede9df0d7c98fdef2d5bd787139dc7cf
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Wed Feb 13 12:24:38 2019 +0100
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Wed Feb 13 18:24:31 2019 +0100
tdf#120787: fine-tune window flags w/ focus on floating toolbars
Floating toolbars are tool windows (Qt::Tool, not Qt::Window which
has a separate taskbar entry). They are frameles
(Qt::FramelessWindowHint) bc LibO takes care of drawing window
decorations itself. They also must be able to receive keyboard focus
(remove Qt::WindowDoesNotAcceptFocus)
Change-Id: I61e8a905fdc4fde1a64df5a0824d358036cfcdea
Reviewed-on: https://gerrit.libreoffice.org/67768
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 656cd6d9f885..26db19ea62c7 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -93,6 +93,11 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo)
{
if (nStyle & SalFrameStyleFlags::INTRO)
aWinFlags |= Qt::SplashScreen;
+ // floating toolbars are frameless tool windows
+ // + they must be able to receive keyboard focus
+ else if ((nStyle & SalFrameStyleFlags::FLOAT)
+ && (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION))
+ aWinFlags |= Qt::Tool | Qt::FramelessWindowHint;
else if (nStyle & (SalFrameStyleFlags::FLOAT | SalFrameStyleFlags::TOOLTIP))
aWinFlags |= Qt::ToolTip;
else if ((nStyle & SalFrameStyleFlags::FLOAT)
@@ -102,8 +107,6 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo)
aWinFlags |= Qt::Dialog;
else if (nStyle & SalFrameStyleFlags::TOOLWINDOW)
aWinFlags |= Qt::Tool;
- else if (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
- aWinFlags |= Qt::Window | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus;
else
aWinFlags |= Qt::Window;
}
More information about the Libreoffice-commits
mailing list