diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2019-11-14 23:25:10 +0100 |
---|---|---|
committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | 2019-11-19 18:04:15 +0100 |
commit | 02c056b071f95257bd09b7fdfa479bff97bc33dc (patch) | |
tree | 5b6289cdd2622f39994845c0fd10c1a80364fbf5 | |
parent | bc32cf9f1ad996c34ed19805787bbc2e5f198b91 (diff) |
tdf#128710 Qt5 don't force immediate paint on show
I tried to build a minimal reproducer with QMainWindow and a
QDialog and miserably failed. All variants of show, hide, modal
change, move, resize, processEvents(QEventLoop::AllEvents) just
worked. I was able to produce "qt.qpa.xcb: QXcbConnection: XCB
error: 3 (BadWindow) ... major code: 18 (ChangeProperty)" entries
in my ~/.xsession-errors, but that didn't matter for my program.
Then I started to comment code blocks in Qt5Frame and after that
continued in Qt5Widget, found that ShowEvent produced a modal
window, albeit with an obviously missing paint event. But that is
fixable by just queuing one in LO.
I tried to debug that broken behaviour to find the real cause of
the bug, but as I already knew from commit e770bacc85a0 ("Qt5
workaround modal change after show bug"), this bug has some timing
related component, so that sadly didn't result in any conclusion.
Change-Id: Iaec45997179365fae5430120f86e435aa5e88447
Reviewed-on: https://gerrit.libreoffice.org/82745
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
(cherry picked from commit 5d23f7748f33414a95297fa9f374a37e76de687b)
Reviewed-on: https://gerrit.libreoffice.org/82805
(cherry picked from commit 876303943113bb7fa09c3b344a832f714ac2d8e3)
Reviewed-on: https://gerrit.libreoffice.org/82965
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
-rw-r--r-- | vcl/qt5/Qt5Widget.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 1d9f41edf75b..1fe4b505055f 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -242,7 +242,10 @@ void Qt5Widget::moveEvent(QMoveEvent* event) void Qt5Widget::showEvent(QShowEvent*) { QSize aSize(m_rFrame.GetQWidget()->size()); - SalPaintEvent aPaintEvt(0, 0, aSize.width(), aSize.height(), true); + // forcing an immediate update somehow interferes with the hide + show + // sequence from Qt5Frame::SetModal, if the frame was already set visible, + // resulting in a hidden / unmapped window + SalPaintEvent aPaintEvt(0, 0, aSize.width(), aSize.height()); m_rFrame.CallCallback(SalEvent::Paint, &aPaintEvt); } |