summaryrefslogtreecommitdiff
path: root/source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2019-05-04 01:29:20 +0000
committerEric Hameleers <alien@slackware.com>2019-05-04 08:59:47 +0200
commit125048ad7d212c1f226b709697505b0ee6a079e4 (patch)
tree4d930a5b4d508518dedfc25375251fe24dda7b92 /source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
parentfe8c535f50697455b55b8ded880317ac33910704 (diff)
downloadcurrent-125048ad7d212c1f226b709697505b0ee6a079e4.tar.gz
Sat May 4 01:29:20 UTC 201920190504012920
d/gcc-9.1.0-x86_64-1.txz: Upgraded. d/gcc-brig-9.1.0-x86_64-1.txz: Upgraded. d/gcc-g++-9.1.0-x86_64-1.txz: Upgraded. d/gcc-gfortran-9.1.0-x86_64-1.txz: Upgraded. d/gcc-gnat-9.1.0-x86_64-1.txz: Upgraded. d/gcc-go-9.1.0-x86_64-1.txz: Upgraded. Shared library .so-version bump. d/gcc-objc-9.1.0-x86_64-1.txz: Upgraded. d/libtool-2.4.6-x86_64-11.txz: Rebuilt. Recompiled to update embedded GCC version number. d/llvm-8.0.0-x86_64-2.txz: Rebuilt. Recompiled with -DLLVM_INSTALL_UTILS=ON. Thanks to Lockywolf. d/swig-4.0.0-x86_64-1.txz: Upgraded. l/glib2-2.60.2-x86_64-1.txz: Upgraded. l/qt-4.8.7-x86_64-13.txz: Rebuilt. Patched to fix FTBFS with gcc9 (also fixes FTBFS with qtscriptgenerator and possibly other projects that use qt4).
Diffstat (limited to 'source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch')
-rw-r--r--source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch b/source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
new file mode 100644
index 00000000..018872f6
--- /dev/null
+++ b/source/l/qt/patches/qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
@@ -0,0 +1,84 @@
+diff -up qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp.QTBUG-21900 qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp
+--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp.QTBUG-21900 2013-05-30 16:18:05.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp 2013-06-09 11:53:45.891771748 -0500
+@@ -818,6 +818,27 @@ static Bool qt_sync_request_scanner(Disp
+ #endif
+ #endif // QT_NO_XSYNC
+
++struct qt_configure_event_data
++{
++ WId window;
++ WId parent;
++};
++
++static Bool qt_configure_event_scanner(Display*, XEvent *event, XPointer arg)
++{
++ qt_configure_event_data *data =
++ reinterpret_cast<qt_configure_event_data*>(arg);
++ if (event->type == ConfigureNotify &&
++ event->xconfigure.window == data->window) {
++ return true;
++ } else if (event->type == ReparentNotify &&
++ event->xreparent.window == data->window) {
++ data->parent = event->xreparent.parent;
++ }
++
++ return false;
++}
++
+ static void qt_x11_create_intern_atoms()
+ {
+ const char *names[QX11Data::NAtoms];
+@@ -5302,8 +5323,11 @@ bool QETWidget::translateConfigEvent(con
+ if (d->extra->compress_events) {
+ // ConfigureNotify compression for faster opaque resizing
+ XEvent otherEvent;
+- while (XCheckTypedWindowEvent(X11->display, internalWinId(), ConfigureNotify,
+- &otherEvent)) {
++ qt_configure_event_data configureData;
++ configureData.window = internalWinId();
++ configureData.parent = d->topData()->parentWinId;
++ while (XCheckIfEvent(X11->display, &otherEvent,
++ &qt_configure_event_scanner, (XPointer)&configureData)) {
+ if (qt_x11EventFilter(&otherEvent))
+ continue;
+
+@@ -5316,13 +5340,19 @@ bool QETWidget::translateConfigEvent(con
+ newSize.setWidth(otherEvent.xconfigure.width);
+ newSize.setHeight(otherEvent.xconfigure.height);
+
++ trust = isVisible()
++ && (configureData.parent == XNone ||
++ configureData.parent == QX11Info::appRootWindow());
++
+ if (otherEvent.xconfigure.send_event || trust) {
+ newCPos.rx() = otherEvent.xconfigure.x +
+ otherEvent.xconfigure.border_width;
+ newCPos.ry() = otherEvent.xconfigure.y +
+ otherEvent.xconfigure.border_width;
+ isCPos = true;
+- }
++ } else {
++ isCPos = false;
++ }
+ }
+ #ifndef QT_NO_XSYNC
+ qt_sync_request_event_data sync_event;
+@@ -5335,9 +5365,14 @@ bool QETWidget::translateConfigEvent(con
+ }
+
+ if (!isCPos) {
+- // we didn't get an updated position of the toplevel.
+- // either we haven't moved or there is a bug in the window manager.
+- // anyway, let's query the position to be certain.
++ // If the last configure event didn't have a trustable position,
++ // it's necessary to query, see ICCCM 4.24:
++ //
++ // Any real ConfigureNotify event on a top-level window implies
++ // that the window’s position on the root may have changed, even
++ // though the event reports that the window’s position in its
++ // parent is unchanged because the window may have been reparented.
++
+ int x, y;
+ Window child;
+ XTranslateCoordinates(X11->display, internalWinId(),