diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2016-03-03 23:19:22 +0300 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2016-03-03 23:19:22 +0300 |
commit | 44acb0ca0b792bd1b7108d9ec268b88d692a90ea (patch) | |
tree | 490b9e37f89a9a49b6c678bc6939ab7fa5235228 /debian/patches | |
parent | f34bfeea9d530763df16cb183ffc6248f8945e95 (diff) | |
download | qtbase-44acb0ca0b792bd1b7108d9ec268b88d692a90ea.tar.gz |
Update patches for the release candidate.
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/Fix-falsely-reported-style-for-fallback-font.patch | 50 | ||||
-rw-r--r-- | debian/patches/Prefer-QT_PLUGIN_PATH-over-compiled-in-paths.patch | 65 | ||||
-rw-r--r-- | debian/patches/Remove-historical-4-padding-in-QFontEngine-alphaMapF.patch | 40 | ||||
-rw-r--r-- | debian/patches/dbusmenu_fixes.diff | 16 | ||||
-rw-r--r-- | debian/patches/fix_not_delivering_focus.patch | 4 | ||||
-rw-r--r-- | debian/patches/gnukfreebsd.diff | 2 | ||||
-rw-r--r-- | debian/patches/multiscreen.diff | 93 | ||||
-rw-r--r-- | debian/patches/qnativesocketengine_freebsd.diff | 16 | ||||
-rw-r--r-- | debian/patches/qt_functions_missing_eval.diff | 16 | ||||
-rw-r--r-- | debian/patches/series | 9 | ||||
-rw-r--r-- | debian/patches/xcb-fix-yet-another-crash-when-screens-are-disconnec.patch | 32 | ||||
-rw-r--r-- | debian/patches/xcb_dont_select_XInput_events_on_root_window.patch | 40 | ||||
-rw-r--r-- | debian/patches/xcb_fix_drag_and_drop_when_window_is_hidden.patch | 139 |
13 files changed, 11 insertions, 511 deletions
diff --git a/debian/patches/Fix-falsely-reported-style-for-fallback-font.patch b/debian/patches/Fix-falsely-reported-style-for-fallback-font.patch deleted file mode 100644 index 46eb557..0000000 --- a/debian/patches/Fix-falsely-reported-style-for-fallback-font.patch +++ /dev/null @@ -1,50 +0,0 @@ -From a856c4a902816a7d691ca50e6f556521287be441 Mon Sep 17 00:00:00 2001 -From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> -Date: Tue, 27 Oct 2015 11:00:35 +0100 -Subject: [PATCH] Fix falsely reported style for fallback font - -In change 8f6b3284106fa11129e4fa6e5ec3adc6cb1f489f we override -the fontDef of the fallback font with the fontDef of the -original font (with the family name replaced) to fix a -regression where boldness was not inherited by the fallback -font. - -This caused a bug, though, since the contents of the fontDef -would now misrepresent the actual font used. The side effect -of this was that isSmoothlyScalable() returned false because -the family and styleName combination we claim to have did -not exist in the font database. Result: We fell back to -native rendering for the font even though it's scalable. - -Weight and style are the only parts that should be inherited, -since they are synthesized. So rather than overwriting -the fontDef completely, we copy the weight and style when -needed. - -The bug in QTBUG-42963 is still fixed after this change. - -[ChangeLog][Text] Fixed problem where fallback fonts for text -with certain styles would be reported as unscalable. - -Change-Id: I95ef67f818852aea5a6ae8df789a52364ecb59a6 -Task-number: QTBUG-47547 -Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> -Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> ---- - src/gui/text/qfontengine.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/src/gui/text/qfontengine.cpp -+++ b/src/gui/text/qfontengine.cpp -@@ -1752,7 +1752,10 @@ - request.family = fallbackFamilyAt(at - 1); - - if (QFontEngine *engine = QFontDatabase::findFont(request, m_script)) { -- engine->fontDef = request; -+ if (request.weight > QFont::Normal) -+ engine->fontDef.weight = request.weight; -+ if (request.style > QFont::StyleNormal) -+ engine->fontDef.style = request.style; - return engine; - } - diff --git a/debian/patches/Prefer-QT_PLUGIN_PATH-over-compiled-in-paths.patch b/debian/patches/Prefer-QT_PLUGIN_PATH-over-compiled-in-paths.patch deleted file mode 100644 index 4a1c007..0000000 --- a/debian/patches/Prefer-QT_PLUGIN_PATH-over-compiled-in-paths.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 6129be8a4ba976c42e51012ebaa9005eb402db80 Mon Sep 17 00:00:00 2001 -From: Milian Wolff <milian.wolff@kdab.com> -Date: Mon, 27 Jul 2015 11:49:55 +0200 -Subject: [PATCH] Prefer QT_PLUGIN_PATH over compiled-in paths. - -Currently, when one compiles a Qt plugin that is also installed -system wide to a local path added to QT_PLUGIN_PATH, you have no -way to ever load it as the global plugin will always be preferred. -This is due to the order in which the QCoreApplications::libraryPaths -are constructed, which always appended the QT_PLUGIN_PATH contents -to the end. - -Now, the QT_PLUGIN_PATH contents are put first, such that the plugins -in there are preferred and loaded. - -[ChangeLog][QtCore][QPluginLoader] Fixed the search order of Qt plugins -so that paths specified by the QT_PLUGIN_PATH environment variable -are searched before built-in paths. - -Change-Id: Iad8ca2cd34e7a622c191a416c01c1c5cc1812fc9 -Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> -Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> ---- - src/corelib/kernel/qcoreapplication.cpp | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - ---- a/src/corelib/kernel/qcoreapplication.cpp -+++ b/src/corelib/kernel/qcoreapplication.cpp -@@ -2470,17 +2470,6 @@ - QMutexLocker locker(libraryPathMutex()); - if (!coreappdata()->app_libpaths) { - QStringList *app_libpaths = coreappdata()->app_libpaths = new QStringList; -- QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath); -- if (QFile::exists(installPathPlugins)) { -- // Make sure we convert from backslashes to slashes. -- installPathPlugins = QDir(installPathPlugins).canonicalPath(); -- if (!app_libpaths->contains(installPathPlugins)) -- app_libpaths->append(installPathPlugins); -- } -- -- // If QCoreApplication is not yet instantiated, -- // make sure we add the application path when we construct the QCoreApplication -- if (self) self->d_func()->appendApplicationPathToLibraryPaths(); - - const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH"); - if (!libPathEnv.isEmpty()) { -@@ -2498,6 +2487,18 @@ - } - } - } -+ -+ QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath); -+ if (QFile::exists(installPathPlugins)) { -+ // Make sure we convert from backslashes to slashes. -+ installPathPlugins = QDir(installPathPlugins).canonicalPath(); -+ if (!app_libpaths->contains(installPathPlugins)) -+ app_libpaths->append(installPathPlugins); -+ } -+ -+ // If QCoreApplication is not yet instantiated, -+ // make sure we add the application path when we construct the QCoreApplication -+ if (self) self->d_func()->appendApplicationPathToLibraryPaths(); - } - return *(coreappdata()->app_libpaths); - } diff --git a/debian/patches/Remove-historical-4-padding-in-QFontEngine-alphaMapF.patch b/debian/patches/Remove-historical-4-padding-in-QFontEngine-alphaMapF.patch deleted file mode 100644 index 9d448af..0000000 --- a/debian/patches/Remove-historical-4-padding-in-QFontEngine-alphaMapF.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 39e023b805cf2be207ef7086f6951e789e020bda Mon Sep 17 00:00:00 2001 -From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> -Date: Mon, 26 Oct 2015 15:20:41 +0100 -Subject: [PATCH] Remove historical +4 padding in - QFontEngine::alphaMapForGlyph() - -Back in the old days, we would pad the output from the font engines -to work around problems with the GL1 paint engine such as issues -with linear sampling, etc. This is no longer needed. Padding is -moved into the glyph cache, and in addition to reducing performance, -the extra padding is also making alphaMapForGlyph() and -alphaMapBoundingBox() fall out of sync when you fall back to -QPainterPath drawing the glyph. The result of this was that, -when prepared, the glyph cache was sometimes not made large enough -to hold what alphaMapForGlyph() actually produced, depending on -the size and order of glyphs, and glyphs ending up at the end of rows -would sometimes be missing from the output. - -[ChangeLog][Text] Fixed some instances of missing glyphs when -drawing large fonts. - -Change-Id: Ia5982392fe1637f6ebc740db9f226fbb91f75166 -Task-number: QTBUG-47547 -Reviewed-by: Gunnar Sletta <gunnar@sletta.org> -Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> ---- - src/gui/text/qfontengine.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/gui/text/qfontengine.cpp -+++ b/src/gui/text/qfontengine.cpp -@@ -875,7 +875,7 @@ - pt.x = -glyph_x; - pt.y = -glyph_y; // the baseline - QPainterPath path; -- QImage im(glyph_width + 4, glyph_height, QImage::Format_ARGB32_Premultiplied); -+ QImage im(glyph_width, glyph_height, QImage::Format_ARGB32_Premultiplied); - im.fill(Qt::transparent); - QPainter p(&im); - p.setRenderHint(QPainter::Antialiasing); diff --git a/debian/patches/dbusmenu_fixes.diff b/debian/patches/dbusmenu_fixes.diff index 11712b1..3b2a5b3 100644 --- a/debian/patches/dbusmenu_fixes.diff +++ b/debian/patches/dbusmenu_fixes.diff @@ -77,7 +77,7 @@ Last-Update: 2016-02-20 } --- a/src/platformsupport/dbusmenu/qdbusmenuadaptor_p.h +++ b/src/platformsupport/dbusmenu/qdbusmenuadaptor_p.h -@@ -129,7 +129,7 @@ +@@ -140,7 +140,7 @@ " </interface>\n" "") public: @@ -86,7 +86,7 @@ Last-Update: 2016-02-20 virtual ~QDBusMenuAdaptor(); public: // PROPERTIES -@@ -155,6 +155,9 @@ +@@ -166,6 +166,9 @@ void ItemActivationRequested(int id, uint timestamp); void ItemsPropertiesUpdated(const QDBusMenuItemList &updatedProps, const QDBusMenuItemKeysList &removedProps); void LayoutUpdated(uint revision, int parent); @@ -168,7 +168,7 @@ Last-Update: 2016-02-20 QDBusMenuItemList QDBusMenuItem::items(const QList<int> &ids, const QStringList &propertyNames) --- a/src/platformsupport/dbusmenu/qdbusmenutypes_p.h +++ b/src/platformsupport/dbusmenu/qdbusmenutypes_p.h -@@ -81,7 +81,7 @@ +@@ -94,7 +94,7 @@ class QDBusMenuLayoutItem { public: @@ -216,7 +216,7 @@ Last-Update: 2016-02-20 QList<const QDBusPlatformMenuItem *> QDBusPlatformMenuItem::byIds(const QList<int> &ids) @@ -149,18 +155,13 @@ - , m_isEnabled(false) + , m_isEnabled(true) , m_isVisible(true) , m_isSeparator(false) - , m_dbusID(nextDBusID++) @@ -321,7 +321,7 @@ Last-Update: 2016-02-20 return m_items.at(position); --- a/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h +++ b/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h -@@ -119,6 +119,7 @@ +@@ -130,6 +130,7 @@ ~QDBusPlatformMenu(); void insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) Q_DECL_OVERRIDE; void removeMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE; @@ -329,7 +329,7 @@ Last-Update: 2016-02-20 void syncMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE; void syncSeparatorsCollapsible(bool enable) Q_DECL_OVERRIDE { Q_UNUSED(enable); } -@@ -133,8 +134,7 @@ +@@ -144,8 +145,7 @@ void setMinimumWidth(int width) Q_DECL_OVERRIDE { Q_UNUSED(width); } void setFont(const QFont &font) Q_DECL_OVERRIDE { Q_UNUSED(font); } void setMenuType(MenuType type) Q_DECL_OVERRIDE { Q_UNUSED(type); } @@ -339,7 +339,7 @@ Last-Update: 2016-02-20 void showPopup(const QWindow *parentWindow, const QRect &targetRect, const QPlatformMenuItem *item) Q_DECL_OVERRIDE { -@@ -155,9 +155,6 @@ +@@ -166,9 +166,6 @@ bool operator==(const QDBusPlatformMenu& other) { return m_tag == other.m_tag; } @@ -349,7 +349,7 @@ Last-Update: 2016-02-20 uint revision() const { return m_revision; } void emitUpdated(); -@@ -173,12 +170,10 @@ +@@ -184,12 +181,10 @@ bool m_isEnabled; bool m_isVisible; bool m_isSeparator; diff --git a/debian/patches/fix_not_delivering_focus.patch b/debian/patches/fix_not_delivering_focus.patch index cdb19d7..a5a4817 100644 --- a/debian/patches/fix_not_delivering_focus.patch +++ b/debian/patches/fix_not_delivering_focus.patch @@ -43,7 +43,7 @@ Change-Id: I433c8b638834c25f113cc134ee4185778c44f540 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp -@@ -894,8 +894,13 @@ static bool focusInPeeker(QXcbConnection +@@ -894,8 +894,13 @@ return true; } uint response_type = event->response_type & ~0x80; @@ -59,7 +59,7 @@ Change-Id: I433c8b638834c25f113cc134ee4185778c44f540 /* We are also interested in XEMBED_FOCUS_IN events */ if (response_type == XCB_CLIENT_MESSAGE) { -@@ -2373,14 +2378,22 @@ void QXcbWindow::handlePropertyNotifyEve +@@ -2369,14 +2374,22 @@ } } diff --git a/debian/patches/gnukfreebsd.diff b/debian/patches/gnukfreebsd.diff index 6e010a2..61e168f 100644 --- a/debian/patches/gnukfreebsd.diff +++ b/debian/patches/gnukfreebsd.diff @@ -157,7 +157,7 @@ Forwarded: no +#endif // QPLATFORMDEFS_H --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf -@@ -126,6 +126,8 @@ +@@ -171,6 +171,8 @@ deppath.name = PATH } else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) { deppath.name = LD_LIBRARY_PATH diff --git a/debian/patches/multiscreen.diff b/debian/patches/multiscreen.diff deleted file mode 100644 index 73a0262..0000000 --- a/debian/patches/multiscreen.diff +++ /dev/null @@ -1,93 +0,0 @@ -Description: xcb: Fix incorrect screen number reported by QDesktopWidget -Origin: upstream, https://codereview.qt-project.org/#/c/138819/ -Last-Update: 2015-01-03 - -commit a6b2a4642f07cd6e52b447e1e441b257990a8d03 -Author: Błażej Szczygieł <spaz16@wp.pl> -Date: Sun Oct 25 01:11:28 2015 +0200 - - Fix incorrect screen number reported by QDesktopWidget - - Screens connected to separate graphics cards are detected as - separate screens which don't have offset. This patch fixes obtaining - the screen number by QWidget: it uses the screen assigned to the root - widget. The patch also assigns a proper QScreen to each QDesktopWidget - screen(). - - It also fixes closing a popup menu by clicking on another screen. - - Task-number: QTBUG-48545 - Change-Id: I3d76261c0c067293d39949c4428b2d8dfd085dc7 - Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> - ---- a/src/widgets/kernel/qdesktopwidget.cpp -+++ b/src/widgets/kernel/qdesktopwidget.cpp -@@ -36,6 +36,7 @@ - #include "qdesktopwidget_p.h" - #include "qscreen.h" - #include "qwidget_p.h" -+#include "qwindow.h" - - QT_BEGIN_NAMESPACE - -@@ -99,13 +100,18 @@ - - QRegion virtualGeometry; - -- // update the geometry of each screen widget, determine virtual geometry -- // and emit change signals afterwards. -+ // update the geometry of each screen widget, determine virtual geometry, -+ // set the new screen for window handle and emit change signals afterwards. - QList<int> changedScreens; - for (int i = 0; i < screens.length(); i++) { -- const QRect screenGeometry = screenList.at(i)->geometry(); -- if (screenGeometry != screens.at(i)->geometry()) { -- screens.at(i)->setGeometry(screenGeometry); -+ QDesktopScreenWidget *screenWidget = screens.at(i); -+ QScreen *qScreen = screenList.at(i); -+ QWindow *winHandle = screenWidget->windowHandle(); -+ if (winHandle && winHandle->screen() != qScreen) -+ winHandle->setScreen(qScreen); -+ const QRect screenGeometry = qScreen->geometry(); -+ if (screenGeometry != screenWidget->geometry()) { -+ screenWidget->setGeometry(screenGeometry); - changedScreens.push_back(i); - } - virtualGeometry += screenGeometry; -@@ -191,6 +197,21 @@ - if (!w) - return 0; - -+ // Find the root widget, get a QScreen pointer from it and find -+ // the screen number. -+ const QWidget *root = w; -+ const QWidget *tmp = w; -+ while ((tmp = tmp->parentWidget())) -+ root = tmp; -+ QWindow *winHandle = root->windowHandle(); -+ if (winHandle) { -+ int screenIdx = QGuiApplication::screens().indexOf(winHandle->screen()); -+ if (screenIdx > -1) -+ return screenIdx; -+ } -+ -+ // If the screen number cannot be obtained using QScreen pointer, -+ // get it from window position using screen geometry. - QRect frame = w->frameGeometry(); - if (!w->isWindow()) - frame.moveTopLeft(w->mapToGlobal(QPoint(0, 0))); ---- a/src/widgets/widgets/qmenu.cpp -+++ b/src/widgets/widgets/qmenu.cpp -@@ -2586,7 +2586,11 @@ - Q_D(QMenu); - if (d->aboutToHide || d->mouseEventTaken(e)) - return; -- if (!rect().contains(e->pos())) { -+ // Workaround for XCB on multiple screens which doesn't have offset. If the menu is open on one screen -+ // and mouse clicks on second screen, e->pos() is QPoint(0,0) and the menu doesn't hide. This trick makes -+ // possible to hide the menu when mouse clicks on another screen (e->screenPos() returns correct value). -+ // Only when mouse clicks in QPoint(0,0) on second screen, the menu doesn't hide. -+ if ((e->pos().isNull() && !e->screenPos().isNull()) || !rect().contains(e->pos())) { - if (d->noReplayFor - && QRect(d->noReplayFor->mapToGlobal(QPoint()), d->noReplayFor->size()).contains(e->globalPos())) - setAttribute(Qt::WA_NoMouseReplay); diff --git a/debian/patches/qnativesocketengine_freebsd.diff b/debian/patches/qnativesocketengine_freebsd.diff deleted file mode 100644 index c9aa7c1..0000000 --- a/debian/patches/qnativesocketengine_freebsd.diff +++ /dev/null @@ -1,16 +0,0 @@ -Description: QNativeSocketEngine: fix undefined variable on FreeBSD -Author: Dmitry Shachnev <mitya57@debian.org> -Forwarded: https://codereview.qt-project.org/144838 -Last-Update: 2015-12-30 - ---- a/src/network/socket/qnativesocketengine_unix.cpp -+++ b/src/network/socket/qnativesocketengine_unix.cpp -@@ -994,7 +994,7 @@ - # elif defined(IP_SENDSRCADDR) - struct in_addr *data = reinterpret_cast<in_addr *>(CMSG_DATA(cmsgptr)); - cmsgptr->cmsg_type = IP_SENDSRCADDR; -- addr->s_addr = htonl(header.senderAddress.toIPv4Address()); -+ data->s_addr = htonl(header.senderAddress.toIPv4Address()); - # endif - cmsgptr->cmsg_level = IPPROTO_IP; - msg.msg_controllen += CMSG_SPACE(sizeof(*data)); diff --git a/debian/patches/qt_functions_missing_eval.diff b/debian/patches/qt_functions_missing_eval.diff deleted file mode 100644 index 07203e5..0000000 --- a/debian/patches/qt_functions_missing_eval.diff +++ /dev/null @@ -1,16 +0,0 @@ -Description: qt_functions.prf: Add missing $$eval -Author: Dmitry Shachnev <mitya57@debian.org> -Forwarded: https://codereview.qt-project.org/144902 -Last-Update: 2016-01-02 - ---- a/mkspecs/features/qt_functions.prf -+++ b/mkspecs/features/qt_functions.prf -@@ -152,7 +152,7 @@ - pluginpath.value = - ppaths = $$[QT_INSTALL_PLUGINS/get] - for(qplug, QT_PLUGINS): \ -- contains(ptypes, QT_PLUGIN.$${qplug}.TYPE): \ -+ contains(ptypes, $$eval(QT_PLUGIN.$${qplug}.TYPE)): \ - ppaths += $$eval(QT_PLUGIN.$${qplug}.PATH) - ppaths = $$unique(ppaths) - for(qplug, ppaths) { diff --git a/debian/patches/series b/debian/patches/series index 0dc6edc..f63cb57 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,16 +1,7 @@ # Backported from upstream -xcb-fix-yet-another-crash-when-screens-are-disconnec.patch -Prefer-QT_PLUGIN_PATH-over-compiled-in-paths.patch -Fix-falsely-reported-style-for-fallback-font.patch -Remove-historical-4-padding-in-QFontEngine-alphaMapF.patch dbusmenu_fixes.diff dbustray_fixes.diff no_dbus_dependency.diff -qnativesocketengine_freebsd.diff -qt_functions_missing_eval.diff -multiscreen.diff -xcb_dont_select_XInput_events_on_root_window.patch -xcb_fix_drag_and_drop_when_window_is_hidden.patch fix_not_delivering_focus.patch # Debian specific. diff --git a/debian/patches/xcb-fix-yet-another-crash-when-screens-are-disconnec.patch b/debian/patches/xcb-fix-yet-another-crash-when-screens-are-disconnec.patch deleted file mode 100644 index e5ded03..0000000 --- a/debian/patches/xcb-fix-yet-another-crash-when-screens-are-disconnec.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d72da0b4b2ee089156d1bd614523838b1635bbf5 Mon Sep 17 00:00:00 2001 -From: Shawn Rutledge <shawn.rutledge@theqtcompany.com> -Date: Fri, 4 Sep 2015 13:27:48 +0200 -Subject: [PATCH] xcb: fix yet another crash when screens are disconnected - -Can't assume that m_screens is not an empty list. - -Task-number: QTBUG-42985 -Change-Id: I6f9422638c219123dc898813910d03c7afbd1450 -Reviewed-by: Uli Schlachter <psychon@znc.in> -Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> ---- - src/plugins/platforms/xcb/qxcbconnection.cpp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/src/plugins/platforms/xcb/qxcbconnection.cpp -+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp -@@ -1288,10 +1288,12 @@ - memset(&event, 0, sizeof(event)); - - const xcb_window_t eventListener = xcb_generate_id(m_connection); -+ xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup); -+ xcb_screen_t *screen = it.data; - Q_XCB_CALL(xcb_create_window(m_connection, XCB_COPY_FROM_PARENT, -- eventListener, m_screens.at(0)->root(), -+ eventListener, screen->root, - 0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY, -- m_screens.at(0)->screen()->root_visual, 0, 0)); -+ screen->root_visual, 0, 0)); - - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; diff --git a/debian/patches/xcb_dont_select_XInput_events_on_root_window.patch b/debian/patches/xcb_dont_select_XInput_events_on_root_window.patch deleted file mode 100644 index 820cbc8..0000000 --- a/debian/patches/xcb_dont_select_XInput_events_on_root_window.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 2d8b0d1cd566cc0c3ab600650b66cdc771d8314f Mon Sep 17 00:00:00 2001 -From: Shawn Rutledge <shawn.rutledge@digia.com> -Date: Mon, 4 Jan 2016 15:09:10 +0100 -Subject: [PATCH] xcb: don't select XInput events on the root window - -If we select XInput events, then when the mouse is clicked, there will -not be a fallback to a core pointer event. But a typical Qt application -doesn't own the root window. If the window manager (such as OpenBox, -Awesome or fvwm) relies on receiving core pointer click events, e.g. -to show a desktop menu, then each time a device is hotplugged while a -Qt application is running, we would select XI2 events and thereby -prevent the window manager from receiving them. - -QDesktopWidget's native window is added to m_mapper, even when -it isn't mapped. Then after hotplugging there's a hierarchy event, -and that calls xi2Select for every window in m_mapper. The assumption -with this patch is that the root window does need to be in m_mapper -in case the QDesktopWidget is shown (that was done already in Qt 5.1: -fca94fa5ed8321e84e7b0ff515620fbb901db545), but xi2Select must avoid -selecting XI2 events on it to fix this bug. - -Task-number: QTBUG-49952 -Change-Id: I5c160e879d93fadfce14120ef2e89a4f71d4f599 -Reviewed-by: Uli Schlachter <psychon@znc.in> -Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> ---- - src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp -+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp -@@ -274,7 +274,7 @@ - - void QXcbConnection::xi2Select(xcb_window_t window) - { -- if (!m_xi2Enabled) -+ if (!m_xi2Enabled || window == rootWindow()) - return; - - Display *xDisplay = static_cast<Display *>(m_xlib_display); diff --git a/debian/patches/xcb_fix_drag_and_drop_when_window_is_hidden.patch b/debian/patches/xcb_fix_drag_and_drop_when_window_is_hidden.patch deleted file mode 100644 index 3679aa7..0000000 --- a/debian/patches/xcb_fix_drag_and_drop_when_window_is_hidden.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 0b3da1907d46a03e8838c4086b23d48ba69c8776 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl> -Date: Sun, 18 Oct 2015 00:16:15 +0200 -Subject: [PATCH] xcb: fix drag and drop when window is hidden - -This patch fixes drag and drop operation on XCB platform when window -will be hidden. The window can be hidden during dnd operation by -switching virtual desktops or by minimizing all windows (show desktop) -using key shortcut. - -The ShapedPixmapWindow must grab mouse before dnd operation if mouse is -not grabbed by other window (like in Qt4). - -Task-number: QTBUG-46243 -Change-Id: I807bc842719a2d0ea0f4dcb733c06c1fd08813e1 -Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> ---- - src/plugins/platforms/xcb/qxcbconnection.cpp | 5 +++++ - src/plugins/platforms/xcb/qxcbconnection.h | 3 +++ - src/plugins/platforms/xcb/qxcbdrag.cpp | 2 ++ - src/plugins/platforms/xcb/qxcbwindow.cpp | 21 +++++++++++++++++++-- - 4 files changed, 29 insertions(+), 2 deletions(-) - ---- a/src/plugins/platforms/xcb/qxcbconnection.cpp -+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp -@@ -535,6 +535,7 @@ - , has_xkb(false) - , m_buttons(0) - , m_focusWindow(0) -+ , m_mouseGrabber(0) - , m_clientLeader(0) - , m_systemTrayTracker(0) - , m_glIntegration(Q_NULLPTR) -@@ -1328,6 +1329,10 @@ - { - m_focusWindow = w; - } -+void QXcbConnection::setMouseGrabber(QXcbWindow *w) -+{ -+ m_mouseGrabber = w; -+} - - void QXcbConnection::grabServer() - { ---- a/src/plugins/platforms/xcb/qxcbconnection.h -+++ b/src/plugins/platforms/xcb/qxcbconnection.h -@@ -469,6 +469,8 @@ - - QXcbWindow *focusWindow() const { return m_focusWindow; } - void setFocusWindow(QXcbWindow *); -+ QXcbWindow *mouseGrabber() const { return m_mouseGrabber; } -+ void setMouseGrabber(QXcbWindow *); - - QByteArray startupId() const { return m_startupId; } - void setStartupId(const QByteArray &nextId) { m_startupId = nextId; } -@@ -647,6 +649,7 @@ - Qt::MouseButtons m_buttons; - - QXcbWindow *m_focusWindow; -+ QXcbWindow *m_mouseGrabber; - - xcb_window_t m_clientLeader; - QByteArray m_startupId; ---- a/src/plugins/platforms/xcb/qxcbdrag.cpp -+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp -@@ -194,6 +194,8 @@ - - setUseCompositing(current_virtual_desktop->compositingActive()); - QBasicDrag::startDrag(); -+ if (connection()->mouseGrabber() == Q_NULLPTR) -+ shapedPixmapWindow()->setMouseGrabEnabled(true); - } - - void QXcbDrag::endDrag() ---- a/src/plugins/platforms/xcb/qxcbwindow.cpp -+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp -@@ -594,12 +594,16 @@ - { - if (window()->type() != Qt::ForeignWindow) - destroy(); -+ else if (connection()->mouseGrabber() == this) -+ connection()->setMouseGrabber(Q_NULLPTR); - } - - void QXcbWindow::destroy() - { - if (connection()->focusWindow() == this) - doFocusOut(); -+ if (connection()->mouseGrabber() == this) -+ connection()->setMouseGrabber(Q_NULLPTR); - - if (m_syncCounter && m_usingSyncProtocol) - Q_XCB_CALL(xcb_sync_destroy_counter(xcb_connection(), m_syncCounter)); -@@ -847,6 +851,9 @@ - - xcb_flush(xcb_connection()); - -+ if (connection()->mouseGrabber() == this) -+ connection()->setMouseGrabber(Q_NULLPTR); -+ - m_mapped = false; - } - -@@ -2357,6 +2364,8 @@ - QWindowSystemInterface::handleWindowStateChanged(window(), newState); - m_lastWindowStateEvent = newState; - m_windowState = newState; -+ if (m_windowState == Qt::WindowMinimized && connection()->mouseGrabber() == this) -+ connection()->setMouseGrabber(Q_NULLPTR); - } - return; - } else if (event->atom == atom(QXcbAtom::_NET_FRAME_EXTENTS)) { -@@ -2411,9 +2420,15 @@ - - bool QXcbWindow::setMouseGrabEnabled(bool grab) - { -+ if (!grab && connection()->mouseGrabber() == this) -+ connection()->setMouseGrabber(Q_NULLPTR); - #ifdef XCB_USE_XINPUT22 -- if (connection()->xi2MouseEvents()) -- return connection()->xi2SetMouseGrabEnabled(m_window, grab); -+ if (connection()->xi2MouseEvents()) { -+ bool result = connection()->xi2SetMouseGrabEnabled(m_window, grab); -+ if (grab && result) -+ connection()->setMouseGrabber(this); -+ return result; -+ } - #endif - if (grab && !connection()->canGrab()) - return false; -@@ -2432,6 +2447,8 @@ - xcb_grab_pointer_reply_t *reply = xcb_grab_pointer_reply(xcb_connection(), cookie, NULL); - bool result = !(!reply || reply->status != XCB_GRAB_STATUS_SUCCESS); - free(reply); -+ if (result) -+ connection()->setMouseGrabber(this); - return result; - } - |