Hello community,

here is the log from the commit of package libqt5-qtbase for openSUSE:Factory 
checked in at 2016-10-01 23:50:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtbase (Old)
 and      /work/SRC/openSUSE:Factory/.libqt5-qtbase.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libqt5-qtbase"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtbase/libqt5-qtbase.changes      
2016-07-12 23:49:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libqt5-qtbase.new/libqt5-qtbase.changes 
2016-10-01 23:50:23.000000000 +0200
@@ -1,0 +2,40 @@
+Thu Sep 29 14:12:34 UTC 2016 - [email protected]
+
+- Move gtk platformtheme again out of the libQt5Gui5 package (now
+  it's gtk-3 based)
+
+-------------------------------------------------------------------
+Tue Sep 27 08:52:43 UTC 2016 - [email protected]
+
+- Fix filelist for %gles configuration
+
+-------------------------------------------------------------------
+Tue Sep 27 08:00:02 UTC 2016 - [email protected]
+
+- Added Stop-unloading-plugins-in-QPluginLoader-and-QFactoryLoader.patch
+  (boo#1001362, boo#965653)
+
+-------------------------------------------------------------------
+Sat Sep 24 18:39:00 UTC 2016 - [email protected]
+
+- Update to 5.7.0
+  * For more details please see:
+    https://www.qt.io/qt5-7/
+- Drop dead/absorbed patches:
+  xcb-Fix-drop-of-text-uri-list-and-text-html.patch and
+  xcb-Fix-dropping-URL-on-Firefox-window.patch
+- Added Fix-unwanted-cache-flush-in-Freetype-engine.patch
+  and xcb-Dont-activate-bypassed-windows-on-mouse-press.patch
+- Don't pass axed options to configure
+- Add double-conversion-devel, libproxy-devel and pkgconfig(gtk+-3.0)
+  (instead of pkgconfig(gtk+-2.0)) BuildRequires
+
+-------------------------------------------------------------------
+Sat Sep 24 18:25:41 UTC 2016 - [email protected]
+
+- Another set of upstream patches for the XCB plugin:
+  XCB-Drop-from-external-app-fix-keyboard-modifier-state.patch
+  xcb-Dont-send-QtWindowNoState-event-when-hiding-minimized-window.patch
+  xcb-Use-the-state-of-the-key-event-to-process-it.patch
+
+-------------------------------------------------------------------

Old:
----
  qtbase-opensource-src-5.6.1.tar.xz
  xcb-Fix-drop-of-text-uri-list-and-text-html.patch
  xcb-Fix-dropping-URL-on-Firefox-window.patch

New:
----
  Fix-unwanted-cache-flush-in-Freetype-engine.patch
  Stop-unloading-plugins-in-QPluginLoader-and-QFactoryLoader.patch
  XCB-Drop-from-external-app-fix-keyboard-modifier-state.patch
  qtbase-opensource-src-5.7.0.tar.xz
  xcb-Dont-activate-bypassed-windows-on-mouse-press.patch
  xcb-Dont-send-QtWindowNoState-event-when-hiding-minimized-window.patch
  xcb-Use-the-state-of-the-key-event-to-process-it.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqt5-qtbase.spec ++++++
--- /var/tmp/diff_new_pack.kIrL97/_old  2016-10-01 23:50:27.000000000 +0200
+++ /var/tmp/diff_new_pack.kIrL97/_new  2016-10-01 23:50:27.000000000 +0200
@@ -26,15 +26,15 @@
 %endif
 
 Name:           libqt5-qtbase
-Version:        5.6.1
+Version:        5.7.0
 Release:        0
 Summary:        C++ Program Library, Core Components
 License:        GPL-3.0 or SUSE-LGPL-2.1-with-digia-exception-1.1
 Group:          System/Libraries
 Url:            http://qt.digia.com
 %define base_name libqt5
-%define real_version 5.6.1
-%define so_version 5.6.1
+%define real_version 5.7.0
+%define so_version 5.7.0
 %define tar_version qtbase-opensource-src-%{real_version}
 Source:         %{tar_version}.tar.xz
 # to get mtime of file:
@@ -52,18 +52,24 @@
 # PATCH-FIX-OPENSUSE disable-rc4-ciphers-bnc865241.diff bnc#865241-- Exclude 
rc4 ciphers from being used by default
 Patch6:         disable-rc4-ciphers-bnc865241.diff
 Patch7:         tell-the-truth-about-private-api.patch
-# patches 1000-2000 and above from upstream 5.6 branch #
-Patch1000:      xcb-Fix-drop-of-text-uri-list-and-text-html.patch
-Patch1001:      xcb-Fix-dropping-URL-on-Firefox-window.patch
-Patch1002:      xcb-Send-also-text-plain-when-a-text-uri-list-is-dropped.patch
-# patches 2000-3000 and above from upstream 5.7 branch #
+Patch8:         xcb-Dont-activate-bypassed-windows-on-mouse-press.patch
+Patch9:         Fix-unwanted-cache-flush-in-Freetype-engine.patch
+# patches 1000-2000 and above from upstream 5.7 branch #
+Patch1000:      xcb-Send-also-text-plain-when-a-text-uri-list-is-dropped.patch
+Patch1001:      
xcb-Dont-send-QtWindowNoState-event-when-hiding-minimized-window.patch
+Patch1002:      XCB-Drop-from-external-app-fix-keyboard-modifier-state.patch
+Patch1003:      xcb-Use-the-state-of-the-key-event-to-process-it.patch
+Patch1004:      
Stop-unloading-plugins-in-QPluginLoader-and-QFactoryLoader.patch
+# patches 2000-3000 and above from upstream 5.8 branch #
 BuildRequires:  alsa-devel
 BuildRequires:  cups-devel
+BuildRequires:  double-conversion-devel
 BuildRequires:  gcc-c++
 BuildRequires:  libjpeg-devel
 BuildRequires:  libmng-devel
 BuildRequires:  libmysqlclient-devel
 BuildRequires:  libpng-devel
+BuildRequires:  libproxy-devel
 BuildRequires:  libtiff-devel
 BuildRequires:  openssl-devel
 BuildRequires:  pcre-devel
@@ -96,7 +102,7 @@
 BuildRequires:  xorg-x11-devel
 BuildRequires:  xz
 BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(gtk+-2.0)
+BuildRequires:  pkgconfig(gtk+-3.0)
 %if 0%{?is_opensuse} 
 BuildRequires:  pkgconfig(harfbuzz)
 %endif
@@ -140,14 +146,16 @@
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
+%patch9 -p1
 %patch1000 -p1
 %patch1001 -p1
 %patch1002 -p1
+%patch1003 -p1
+%patch1004 -p1
 
 # be sure not to use them
-rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
-#rm -r mkspecs/features/qt_module.prf.orig
-#rm -r qtimageformats/src/3rdparty/{libtiff,libmng}
+rm -rf src/3rdparty/{libjpeg,freetype,zlib}
 
 %package devel
 Summary:        Qt Development Kit
@@ -484,6 +492,15 @@
 %description -n libQt5Gui5
 Qt 5 libraries which are depending on X11.
 
+%package platformtheme-gtk3
+Summary:        Qt 5 gtk3 plugin
+Group:          Development/Libraries/C and C++
+Supplements:    packageand(libQt5Gui5:libgtk-3-0)
+Requires:       libQt5Gui5 = %{version}
+
+%description platformtheme-gtk3
+Qt 5 plugin for better integration with gtk3-based desktop enviroments.
+
 %package -n libQt5Gui-devel
 Summary:        Qt 5 GUI related libraries - development files
 Group:          Development/Libraries/C and C++
@@ -712,7 +729,6 @@
        -dbus-linked \
        -xfixes \
        -xrandr \
-       -xinerama \
        -sm \
        -no-rpath \
        -system-libjpeg \
@@ -724,7 +740,6 @@
        -fontconfig \
        -system-freetype \
        -cups \
-       -nis \
        -system-zlib \
        -iconv \
        -no-pch \
@@ -736,8 +751,6 @@
        -journald \
 %endif
        -xsync \
-       -xinput \
-       -gtkstyle \
        -xcb \
        -egl \
        -eglfs \
@@ -772,22 +785,22 @@
 
 install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/macros.qt5
 # argggh, qmake is such a piece of <censored>
-find %{buildroot}/%{libqt5_libdir} -type f -name '*prl' -exec perl -pi -e "s, 
-L$RPM_BUILD_DIR/\S+,,g" {} \;
-find %{buildroot}/%{libqt5_libdir} -type f -name '*prl' -exec sed -i -e 
"/^QMAKE_PRL_BUILD_DIR/d" {} \;
-find %{buildroot}/%{libqt5_libdir} -type f -name '*la' -print -exec perl -pi 
-e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} \;
+find %{buildroot}%{libqt5_libdir} -type f -name '*prl' -exec perl -pi -e "s, 
-L$RPM_BUILD_DIR/\S+,,g" {} \;
+find %{buildroot}%{libqt5_libdir} -type f -name '*prl' -exec sed -i -e 
"/^QMAKE_PRL_BUILD_DIR/d" {} \;
+find %{buildroot}%{libqt5_libdir} -type f -name '*la' -print -exec perl -pi -e 
"s, -L$RPM_BUILD_DIR/?\S+,,g" {} \;
 # insanity ...
-find %{buildroot}/%{libqt5_libdir} -type f -name '*pc' -print -exec perl -pi 
-e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} \; -exec sed -i -e 
"s,^moc_location=.*,moc_location=%libqt5_bindir/moc," -e 
"s,uic_location=.*,uic_location=%libqt5_bindir/uic," {} \;
-find %{buildroot}/%{libqt5_libdir}/ -name 'lib*.a' -exec chmod -x -- {} \;
+find %{buildroot}%{libqt5_libdir} -type f -name '*pc' -print -exec perl -pi -e 
"s, -L$RPM_BUILD_DIR/?\S+,,g" {} \; -exec sed -i -e 
"s,^moc_location=.*,moc_location=%libqt5_bindir/moc," -e 
"s,uic_location=.*,uic_location=%libqt5_bindir/uic," {} \;
+find %{buildroot}%{libqt5_libdir}/ -name 'lib*.a' -exec chmod -x -- {} \;
 # kill .la files
 rm -f %{buildroot}%{libqt5_libdir}/lib*.la
 
 # 
 rm -fv %{buildroot}%{libqt5_libdir}/cmake/Qt5*/Q*Plugin.cmake
 
-mkdir -p %{buildroot}/%{libqt5_plugindir}/sqldrivers
+mkdir -p %{buildroot}%{libqt5_plugindir}/sqldrivers
 
 # put all the binaries to %{_bindir}, add -qt5 suffix, and symlink them back 
to %_qt5_bindir
-mkdir %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_bindir}
 pushd %{buildroot}%{libqt5_bindir}
 for i in * ; do
   case "${i}" in
@@ -1030,6 +1043,9 @@
 %{libqt5_libdir}/sse2/libQt5Gui.so.*
 %endif
 %{libqt5_libdir}/libQt5EglDeviceIntegration.so.*
+%if %gles
+%{libqt5_libdir}/libQt5EglFsKmsSupport.so.*
+%endif
 %{libqt5_libdir}/libQt5XcbQpa.so.*
 %{libqt5_plugindir}/generic
 %{libqt5_plugindir}/imageformats
@@ -1037,13 +1053,22 @@
 %{libqt5_plugindir}/platforms
 %{libqt5_plugindir}/egldeviceintegrations
 %{libqt5_plugindir}/xcbglintegrations
-%{libqt5_plugindir}/platformthemes/
+
+%files platformtheme-gtk3
+%defattr(-,root,root,755)
+%doc *.txt LICENSE.*
+%dir %{libqt5_plugindir}/platformthemes
+%{libqt5_plugindir}/platformthemes/libqgtk3.so
 
 %files -n libQt5Gui-devel
 %defattr(-,root,root,755)
 %doc *.txt LICENSE.*
 %{libqt5_libdir}/libQt5Gui.so
 %{libqt5_libdir}/libQt5Gui.prl
+%if %gles
+%{libqt5_libdir}/libQt5EglFsKmsSupport.prl
+%{libqt5_libdir}/libQt5EglFsKmsSupport.so
+%endif
 %{libqt5_libdir}/cmake/Qt5Gui/
 %{libqt5_libdir}/pkgconfig/Qt5Gui.pc
 %{libqt5_includedir}/QtGui/

++++++ Fix-unwanted-cache-flush-in-Freetype-engine.patch ++++++
>From 6f423555eba55ccdf7287071e10576bc1b687fd2 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <[email protected]>
Date: Mon, 1 Aug 2016 13:39:53 +0200
Subject: REG: Fix unwanted cache flush in Freetype engine

The Freetype cache was almost completely disabled by
134c6db8587a8ce156d4fa31ffa62605821851b2 because after that
change, the lockedAlphaMapForGlyph() function would no longer
cut off early for empty glyphs like spaces, but rather go
through all alpha map functions before it realized that there
was nothing to render. This would in turn invalidate the cache
for every empty glyph, causing all glyphs to be rerendered for
every isolated word.

This change adds back a cut off. This is only needed in the
lockedAlphaMapForGlyph() function, since the superclass implementation
of the other alpha map functions already contains a cut off for
width/height == 0.

[ChangeLog][Qt Gui][Text] Fixed a performance regression in Freetype
engine that was introduced in Qt 5.5.

Change-Id: I381285939909e99cc5fb5f3497fecf9fa871f29a
Task-number: QTBUG-49452
Reviewed-by: Simon Hausmann <[email protected]>
---
 src/gui/text/qfontengine_ft.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 4de41df..7c878da 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1716,7 +1716,7 @@ glyph_metrics_t 
QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe
 
 static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, 
QFontEngine::GlyphFormat glyphFormat)
 {
-    if (glyph == Q_NULLPTR)
+    if (glyph == Q_NULLPTR || glyph->height == 0 || glyph->width == 0)
         return QImage();
 
     QImage::Format format = QImage::Format_Invalid;
@@ -1764,11 +1764,15 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t 
glyphIndex, QFixed subPixe
 
     currentlyLockedAlphaMap = alphaMapFromGlyphData(glyph, neededFormat);
 
+    const bool glyphHasGeometry = glyph != Q_NULLPTR && glyph->height != 0 && 
glyph->width != 0;
     if (!cacheEnabled && glyph != &emptyGlyph) {
         currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy();
         delete glyph;
     }
 
+    if (!glyphHasGeometry)
+        return Q_NULLPTR;
+
     if (currentlyLockedAlphaMap.isNull())
         return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, 
subPixelPosition, neededFormat, t, offset);
 
-- 
cgit v1.0-4-g1e03
++++++ Stop-unloading-plugins-in-QPluginLoader-and-QFactoryLoader.patch ++++++
>From 8081ab4938b192bb740c5ee3004468aa6840563d Mon Sep 17 00:00:00 2001
From: Thiago Macieira <[email protected]>
Date: Thu, 12 Nov 2015 10:14:51 -0800
Subject: [PATCH] Stop unloading plugins in QPluginLoader and QFactoryLoader

QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
missed the equivalent code in QFactoryLoader (which bypasses
QPluginLoader). Besides, QPluginLoader::unload() was still doing
unloading, which it won't anymore.

Not unloading plugins is Qt's policy, as decided during the 5.0
development process and reaffirmed now in 5.6. This is due to static
data in plugins leaking out and remaining in use past the unloading of
the plugin, causing crashes.

This does not affect QLibrary and QLibrary::unload(). Those are meant
for non-Qt loadable modules, so unloading them may be safe.

Task-number: QTBUG-49061
Task-number: QTBUG-52988
Discussed-on: 
http://lists.qt-project.org/pipermail/development/2015-November/023681.html
Change-Id: I6b3a1770e6c79cc4485a28ab286e069b88a149e5
---
 src/corelib/plugin/qfactoryloader.cpp | 6 ++++--
 src/corelib/plugin/qpluginloader.cpp  | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/corelib/plugin/qfactoryloader.cpp 
b/src/corelib/plugin/qfactoryloader.cpp
index dcf1b1a..b6558f5 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -208,10 +208,12 @@ void QFactoryLoader::update()
                     ++keyUsageCount;
                 }
             }
-            if (keyUsageCount || keys.isEmpty())
+            if (keyUsageCount || keys.isEmpty()) {
+                library->setLoadHints(QLibrary::PreventUnloadHint); // once 
loaded, don't unload
                 d->libraryList += library;
-            else
+            } else {
                 library->release();
+            }
         }
     }
 #else
diff --git a/src/corelib/plugin/qpluginloader.cpp 
b/src/corelib/plugin/qpluginloader.cpp
index 37f2368..0ea8280 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -148,6 +148,7 @@ QPluginLoader::QPluginLoader(const QString &fileName, 
QObject *parent)
     : QObject(parent), d(0), did_load(false)
 {
     setFileName(fileName);
+    setLoadHints(QLibrary::PreventUnloadHint);
 }
 
 /*!
@@ -342,7 +343,7 @@ static QString locatePlugin(const QString& fileName)
 void QPluginLoader::setFileName(const QString &fileName)
 {
 #if defined(QT_SHARED)
-    QLibrary::LoadHints lh;
+    QLibrary::LoadHints lh = QLibrary::PreventUnloadHint;
     if (d) {
         lh = d->loadHints();
         d->release();
@@ -391,7 +392,7 @@ Q_GLOBAL_STATIC(StaticPluginList, staticPluginList)
     \brief Give the load() function some hints on how it should behave.
 
     You can give hints on how the symbols in the plugin are
-    resolved. By default, none of the hints are set.
+    resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set.
 
     See the documentation of QLibrary::loadHints for a complete
     description of how this property works.
-- 
2.7.4
++++++ XCB-Drop-from-external-app-fix-keyboard-modifier-state.patch ++++++
>From 2c48695f04b0f4b3b11ec037b13132b146cad082 Mon Sep 17 00:00:00 2001
From: Frederik Gladhorn <[email protected]>
Date: Thu, 15 Sep 2016 23:21:15 +0200
Subject: XCB Drop from external app: fix keyboard modifier state

Fix inspired by Qt 4 sources. When we get drop events that are not
coming from the same application, it's unlikely that the keyboard
modifiers are in a sensible state (the usual XCB events are not sent
during drag and drop), so set the keyboard modifier state explicitly.

Task-number: QTBUG-49645
Change-Id: I9360f2b7ffeaa5243a4dfe7ccf96df134c5d2156
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Laszlo Agocs <[email protected]>
---
 src/plugins/platforms/xcb/qxcbdrag.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp 
b/src/plugins/platforms/xcb/qxcbdrag.cpp
index f93e420..acfb580 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -960,6 +960,9 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const 
xcb_client_message_event_t *e
     } else {
         dropData = platformDropData();
         supported_drop_actions = accepted_drop_action;
+
+        // Drop coming from another app? Update keyboard modifiers.
+        QGuiApplicationPrivate::modifier_buttons = 
QGuiApplication::queryKeyboardModifiers();
     }
 
     if (!dropData)
-- 
cgit v1.0-4-g1e03

++++++ qtbase-opensource-src-5.6.1.tar.xz -> qtbase-opensource-src-5.7.0.tar.xz 
++++++
/work/SRC/openSUSE:Factory/libqt5-qtbase/qtbase-opensource-src-5.6.1.tar.xz 
/work/SRC/openSUSE:Factory/.libqt5-qtbase.new/qtbase-opensource-src-5.7.0.tar.xz
 differ: char 26, line 1

++++++ tell-the-truth-about-private-api.patch ++++++
--- /var/tmp/diff_new_pack.kIrL97/_old  2016-10-01 23:50:27.000000000 +0200
+++ /var/tmp/diff_new_pack.kIrL97/_new  2016-10-01 23:50:27.000000000 +0200
@@ -2,7 +2,7 @@
 index aefd3ae..53a3f60 100644
 --- a/mkspecs/features/qt_module.prf
 +++ b/mkspecs/features/qt_module.prf
-@@ -196,12 +196,14 @@ android: CONFIG += qt_android_deps no_li
+@@ -195,12 +195,14 @@ android: CONFIG += qt_android_deps no_li
      verscript = $${TARGET}.version
      QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript
  
@@ -20,7 +20,7 @@
              verscript_content += "    @FILE:$${_PRO_FILE_PWD_}/$$header@"
          verscript_content += "};"
  
-@@ -222,7 +224,7 @@ android: CONFIG += qt_android_deps no_li
+@@ -221,7 +223,7 @@ android: CONFIG += qt_android_deps no_li
          verscriptprocess.name = linker version script ${QMAKE_FILE_BASE}
          verscriptprocess.input = verscript_in
          verscriptprocess.CONFIG += no_link target_predeps

++++++ xcb-Dont-activate-bypassed-windows-on-mouse-press.patch ++++++
>From 444ba31a0a68421ee9ff7de788f6026599202455 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <[email protected]>
Date: Fri, 10 Jun 2016 00:11:35 +0200
Subject: xcb: Don't activate bypassed windows on mouse press

Windows with "Qt::BypassWindowManagerHint" flag can't be activated by
mouse. They can be activated only from code calling "activateWindow()"
or "requestActivate()" methods.

The patch applies also for "Qt::ToolTip" and "Qt::Popup" windows which
have implicit "Qt::BypassWindowManagerHint" flag.

The patch fixes some major issues:
- don't activate tooltips on mouse press - this causes that Qt "thinks"
that original windows loses its focus causing e.g. that text cursor
stops blinking,
- don't activate X11 tray icon - this causes that the active window
looses its focus by clicking tray icon.

The patch restores the Qt4 behavior.

Task-number: QTBUG-53993
Change-Id: I80b226f2f5ea0ebbfe8922c90d9da9f4132e8cce
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Laszlo Agocs <[email protected]>
---
 src/plugins/platforms/xcb/qxcbwindow.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp 
b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 0c2f0d7..b5cde14 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2201,8 +2201,11 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int 
event_y, int root_x, in
     const bool isWheel = detail >= 4 && detail <= 7;
     if (!isWheel && window() != QGuiApplication::focusWindow()) {
         QWindow *w = static_cast<QWindowPrivate 
*>(QObjectPrivate::get(window()))->eventReceiver();
-        if (!(w->flags() & Qt::WindowDoesNotAcceptFocus))
+        if (!(w->flags() & (Qt::WindowDoesNotAcceptFocus | 
Qt::BypassWindowManagerHint))
+                && w->type() != Qt::ToolTip
+                && w->type() != Qt::Popup) {
             w->requestActivate();
+        }
     }
 
     updateNetWmUserTime(timestamp);
-- 
cgit v1.0-4-g1e03
 
++++++ xcb-Dont-send-QtWindowNoState-event-when-hiding-minimized-window.patch 
++++++
>From 2cf3dee10be1d2163eff0893f51f9ece643c2540 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <[email protected]>
Date: Mon, 12 Sep 2016 15:22:20 +0200
Subject: xcb: Don't send "Qt::WindowNoState" event when hiding minimized
 window

This prevents getting "QWidget::showEvent()" when hiding minimized
widget on some WMs like Marco or Xfwm4.

If QWindow is minimized and it gets the new "XCB_WM_STATE_WITHDRAWN"
event from XCB, then don't change the QWindow state.

Task-number: QTBUG-55942
Change-Id: I90cfc2bf55e507864ad8f26c8f569ea562c27314
Reviewed-by: Uli Schlachter <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
---
 src/plugins/platforms/xcb/qxcbwindow.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp 
b/src/plugins/platforms/xcb/qxcbwindow.cpp
index da50201..d46228c 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2543,8 +2543,13 @@ void QXcbWindow::handlePropertyNotifyEvent(const 
xcb_property_notify_event_t *ev
 
             if (reply && reply->format == 32 && reply->type == 
atom(QXcbAtom::WM_STATE)) {
                 const quint32 *data = (const quint32 
*)xcb_get_property_value(reply);
-                if (reply->length != 0 && XCB_WM_STATE_ICONIC == data[0])
-                    newState = Qt::WindowMinimized;
+                if (reply->length != 0) {
+                    if (data[0] == XCB_WM_STATE_ICONIC
+                            || (data[0] == XCB_WM_STATE_WITHDRAWN
+                                && m_lastWindowStateEvent == 
Qt::WindowMinimized)) {
+                        newState = Qt::WindowMinimized;
+                    }
+                }
             }
             free(reply);
         } else { // _NET_WM_STATE can't change minimized state
-- 
cgit v1.0-4-g1e03
++++++ xcb-Use-the-state-of-the-key-event-to-process-it.patch ++++++
>From 76adb6c29f9284a3d7cceb8fb09c3bb7c4cd5e1b Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <[email protected]>
Date: Thu, 21 Apr 2016 01:39:27 +0200
Subject: xcb: Use the state of the key event to process it

Instead of the global state

Task-number: QTBUG-48795
Change-Id: Ic2c545718adb68df41730e5a3bf25adb374ffce3
Reviewed-by: Frederik Gladhorn <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Gatis Paeglis <[email protected]>
---
 src/plugins/platforms/xcb/qxcbkeyboard.cpp | 72 ++++++++++++++++++------------
 src/plugins/platforms/xcb/qxcbkeyboard.h   |  2 +
 2 files changed, 46 insertions(+), 28 deletions(-)

diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp 
b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 28de86b..e0fcc01 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -742,8 +742,7 @@ void QXcbKeyboard::updateKeymap()
     // update xkb state object
     xkb_state_unref(xkb_state);
     xkb_state = new_state;
-    if (!connection()->hasXKB())
-        updateXKBMods();
+    updateXKBMods();
 
     checkForLatinLayout();
 }
@@ -768,32 +767,37 @@ void 
QXcbKeyboard::updateXKBState(xcb_xkb_state_notify_event_t *state)
 }
 #endif
 
+void QXcbKeyboard::updateXKBStateFromState(struct xkb_state *kb_state, quint16 
state)
+{
+    const quint32 modsDepressed = xkb_state_serialize_mods(kb_state, 
XKB_STATE_MODS_DEPRESSED);
+    const quint32 modsLatched = xkb_state_serialize_mods(kb_state, 
XKB_STATE_MODS_LATCHED);
+    const quint32 modsLocked = xkb_state_serialize_mods(kb_state, 
XKB_STATE_MODS_LOCKED);
+    const quint32 xkbMask = xkbModMask(state);
+
+    const quint32 latched = modsLatched & xkbMask;
+    const quint32 locked = modsLocked & xkbMask;
+    quint32 depressed = modsDepressed & xkbMask;
+    // set modifiers in depressed if they don't appear in any of the final 
masks
+    depressed |= ~(depressed | latched | locked) & xkbMask;
+
+    const xkb_state_component newState
+            = xkb_state_update_mask(kb_state,
+                            depressed,
+                            latched,
+                            locked,
+                            0,
+                            0,
+                            (state >> 13) & 3); // bits 13 and 14 report the 
state keyboard group
+
+    if ((newState & XKB_STATE_LAYOUT_EFFECTIVE) == XKB_STATE_LAYOUT_EFFECTIVE) 
{
+        //qWarning("TODO: Support KeyboardLayoutChange on QPA (QTBUG-27681)");
+    }
+}
+
 void QXcbKeyboard::updateXKBStateFromCore(quint16 state)
 {
     if (m_config && !connection()->hasXKB()) {
-        const quint32 modsDepressed = xkb_state_serialize_mods(xkb_state, 
XKB_STATE_MODS_DEPRESSED);
-        const quint32 modsLatched = xkb_state_serialize_mods(xkb_state, 
XKB_STATE_MODS_LATCHED);
-        const quint32 modsLocked = xkb_state_serialize_mods(xkb_state, 
XKB_STATE_MODS_LOCKED);
-        const quint32 xkbMask = xkbModMask(state);
-
-        const quint32 latched = modsLatched & xkbMask;
-        const quint32 locked = modsLocked & xkbMask;
-        quint32 depressed = modsDepressed & xkbMask;
-        // set modifiers in depressed if they don't appear in any of the final 
masks
-        depressed |= ~(depressed | latched | locked) & xkbMask;
-
-        const xkb_state_component newState
-                = xkb_state_update_mask(xkb_state,
-                              depressed,
-                              latched,
-                              locked,
-                              0,
-                              0,
-                              (state >> 13) & 3); // bits 13 and 14 report the 
state keyboard group
-
-        if ((newState & XKB_STATE_LAYOUT_EFFECTIVE) == 
XKB_STATE_LAYOUT_EFFECTIVE) {
-            //qWarning("TODO: Support KeyboardLayoutChange on QPA 
(QTBUG-27681)");
-        }
+        updateXKBStateFromState(xkb_state, state);
     }
 }
 
@@ -1455,7 +1459,16 @@ void QXcbKeyboard::handleKeyEvent(xcb_window_t 
sourceWindow, QEvent::Type type,
     if (type == QEvent::KeyPress)
         targetWindow->updateNetWmUserTime(time);
 
-    xcb_keysym_t sym = xkb_state_key_get_one_sym(xkb_state, code);
+    // Have a temporary keyboard state filled in from state
+    // this way we allow for synthetic events to have different state
+    // from the current state i.e. you can have Alt+Ctrl pressed
+    // and receive a synthetic key event that has neither Alt nor Ctrl pressed
+    struct xkb_state *kb_state = xkb_state_new(xkb_keymap);
+    if (!kb_state)
+        return;
+    updateXKBStateFromState(kb_state, state);
+
+    xcb_keysym_t sym = xkb_state_key_get_one_sym(kb_state, code);
 
     QPlatformInputContext *inputContext = 
QGuiApplicationPrivate::platformIntegration()->inputContext();
     QMetaMethod method;
@@ -1474,11 +1487,13 @@ void QXcbKeyboard::handleKeyEvent(xcb_window_t 
sourceWindow, QEvent::Type type,
                       Q_ARG(uint, code),
                       Q_ARG(uint, state),
                       Q_ARG(bool, type == QEvent::KeyPress));
-        if (retval)
+        if (retval) {
+            xkb_state_unref(kb_state);
             return;
+        }
     }
 
-    QString string = lookupString(xkb_state, code);
+    QString string = lookupString(kb_state, code);
 
     // Ιf control modifier is set we should prefer latin character, this is
     // used for standard shortcuts in checks like "key == QKeySequence::Copy",
@@ -1547,6 +1562,7 @@ void QXcbKeyboard::handleKeyEvent(xcb_window_t 
sourceWindow, QEvent::Type type,
             QWindowSystemInterface::handleExtendedKeyEvent(window, time, 
QEvent::KeyPress, qtcode, modifiers,
                                                            code, sym, state, 
string, isAutoRepeat);
     }
+    xkb_state_unref(kb_state);
 }
 
 QString QXcbKeyboard::lookupString(struct xkb_state *state, xcb_keycode_t 
code) const
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h 
b/src/plugins/platforms/xcb/qxcbkeyboard.h
index 457a27a..dc27511 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -98,6 +98,8 @@ protected:
     void checkForLatinLayout();
 
 private:
+    void updateXKBStateFromState(struct xkb_state *kb_state, quint16 state);
+
     bool m_config;
     xcb_keycode_t m_autorepeat_code;
 
-- 
cgit v1.0-4-g1e03

Reply via email to