[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Mar 12 20:13:14 UTC 2019
vcl/qt5/Qt5Frame.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 42dd1f0ad75b5509ce2e1dbaec9944b0876603db
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Wed Feb 13 12:24:38 2019 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Tue Mar 12 21:12:52 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>
(cherry picked from commit dc32f930ede9df0d7c98fdef2d5bd787139dc7cf)
Reviewed-on: https://gerrit.libreoffice.org/69096
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 841350f95704..3537c1b286ba 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