[SCM] qtbase packaging branch, experimental, updated. debian/5.6.0+dfsg-3-3-g38f9e86
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Wed Jun 8 11:41:01 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtbase.git;a=commitdiff;h=38f9e86
The following commit has been merged in the experimental branch:
commit 38f9e860a095e68131f6e252d4d548bd80888f4b
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Wed Jun 8 14:40:48 2016 +0300
Rebase to upstream release 5.6.1.
---
debian/changelog | 9 +-
debian/patches/dbusmenu_fixes.diff | 364 --------------------------
debian/patches/dbustray_fixes.diff | 80 ------
debian/patches/fix_alsa_detection.patch | 21 --
debian/patches/fix_not_delivering_focus.patch | 86 ------
debian/patches/fix_qtdbus_deadlock.diff | 100 -------
debian/patches/gnukfreebsd.diff | 2 +-
debian/patches/series | 5 -
8 files changed, 9 insertions(+), 658 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9085865..e082716 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,13 @@
-qtbase-opensource-src (5.6.0+dfsg-4) UNRELEASED; urgency=medium
+qtbase-opensource-src (5.6.1+dfsg-1) UNRELEASED; urgency=medium
[ Dmitry Shachnev ]
+ * New upstream release.
+ * Drop the following patches, applied upstream:
+ - dbusmenu_fixes.diff
+ - dbustray_fixes.diff
+ - fix_not_delivering_focus.patch
+ - fix_qtdbus_deadlock.diff
+ - fix_alsa_detection.patch
* Drop Qt5EglDeviceIntegration.pc from qtbase5-dev.install-kfreebsd.
It is no longer built in Qt 5.6, and removed from install-linux file
too when updating the packages to 5.6.
diff --git a/debian/patches/dbusmenu_fixes.diff b/debian/patches/dbusmenu_fixes.diff
deleted file mode 100644
index 3b2a5b3..0000000
--- a/debian/patches/dbusmenu_fixes.diff
+++ /dev/null
@@ -1,364 +0,0 @@
-Description: dbusmenu: refactor the code to allow dynamic updating of menus
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9c7f37e648024a8c
-Last-Update: 2016-02-20
-
---- a/src/platformsupport/dbusmenu/qdbusmenuadaptor.cpp
-+++ b/src/platformsupport/dbusmenu/qdbusmenuadaptor.cpp
-@@ -51,8 +51,9 @@
-
- QT_BEGIN_NAMESPACE
-
--QDBusMenuAdaptor::QDBusMenuAdaptor(QObject *parent)
-- : QDBusAbstractAdaptor(parent)
-+QDBusMenuAdaptor::QDBusMenuAdaptor(QDBusPlatformMenu *topLevelMenu)
-+ : QDBusAbstractAdaptor(topLevelMenu)
-+ , m_topLevelMenu(topLevelMenu)
- {
- setAutoRelaySignals(true);
- }
-@@ -80,7 +81,17 @@
- bool QDBusMenuAdaptor::AboutToShow(int id)
- {
- qCDebug(qLcMenu) << id;
-- return false;
-+ if (id == 0) {
-+ emit m_topLevelMenu->aboutToShow();
-+ } else {
-+ QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);
-+ if (item) {
-+ const QDBusPlatformMenu *menu = static_cast<const QDBusPlatformMenu *>(item->menu());
-+ if (menu)
-+ emit const_cast<QDBusPlatformMenu *>(menu)->aboutToShow();
-+ }
-+ }
-+ return false; // updateNeeded (we don't know that, so false)
- }
-
- QList<int> QDBusMenuAdaptor::AboutToShowGroup(const QList<int> &ids, QList<int> &idErrors)
-@@ -88,6 +99,8 @@
- qCDebug(qLcMenu) << ids;
- Q_UNUSED(idErrors)
- idErrors.clear();
-+ Q_FOREACH (int id, ids)
-+ AboutToShow(id);
- return QList<int>(); // updatesNeeded
- }
-
-@@ -97,9 +110,20 @@
- Q_UNUSED(timestamp)
- QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);
- qCDebug(qLcMenu) << id << (item ? item->text() : QLatin1String("")) << eventId;
-- // Events occur on both menus and menuitems, but we only care if it's an item being clicked.
- if (item && eventId == QLatin1String("clicked"))
- item->trigger();
-+ if (item && eventId == QLatin1String("hovered"))
-+ emit item->hovered();
-+ if (eventId == QLatin1String("closed")) {
-+ // There is no explicit AboutToHide method, so map closed event to aboutToHide method
-+ const QDBusPlatformMenu *menu = Q_NULLPTR;
-+ if (item)
-+ menu = static_cast<const QDBusPlatformMenu *>(item->menu());
-+ else if (id == 0)
-+ menu = m_topLevelMenu;
-+ if (menu)
-+ emit const_cast<QDBusPlatformMenu *>(menu)->aboutToHide();
-+ }
- }
-
- void QDBusMenuAdaptor::EventGroup(const QDBusMenuEventList &events)
-@@ -116,7 +140,7 @@
-
- uint QDBusMenuAdaptor::GetLayout(int parentId, int recursionDepth, const QStringList &propertyNames, QDBusMenuLayoutItem &layout)
- {
-- uint ret = layout.populate(parentId, recursionDepth, propertyNames);
-+ uint ret = layout.populate(parentId, recursionDepth, propertyNames, m_topLevelMenu);
- qCDebug(qLcMenu) << parentId << "depth" << recursionDepth << propertyNames << layout.m_id << layout.m_properties << "revision" << ret << layout;
- return ret;
- }
---- a/src/platformsupport/dbusmenu/qdbusmenuadaptor_p.h
-+++ b/src/platformsupport/dbusmenu/qdbusmenuadaptor_p.h
-@@ -140,7 +140,7 @@
- " </interface>
"
- "")
- public:
-- QDBusMenuAdaptor(QObject *parent);
-+ QDBusMenuAdaptor(QDBusPlatformMenu *topLevelMenu);
- virtual ~QDBusMenuAdaptor();
-
- public: // PROPERTIES
-@@ -166,6 +166,9 @@
- void ItemActivationRequested(int id, uint timestamp);
- void ItemsPropertiesUpdated(const QDBusMenuItemList &updatedProps, const QDBusMenuItemKeysList &removedProps);
- void LayoutUpdated(uint revision, int parent);
-+
-+private:
-+ QDBusPlatformMenu *m_topLevelMenu;
- };
-
- QT_END_NAMESPACE
---- a/src/platformsupport/dbusmenu/qdbusmenutypes.cpp
-+++ b/src/platformsupport/dbusmenu/qdbusmenutypes.cpp
-@@ -79,29 +79,27 @@
- return arg;
- }
-
--uint QDBusMenuLayoutItem::populate(int id, int depth, const QStringList &propertyNames)
-+uint QDBusMenuLayoutItem::populate(int id, int depth, const QStringList &propertyNames, const QDBusPlatformMenu *topLevelMenu)
- {
- qCDebug(qLcMenu) << id << "depth" << depth << propertyNames;
- m_id = id;
- if (id == 0) {
- m_properties.insert(QLatin1String("children-display"), QLatin1String("submenu"));
-- Q_FOREACH (const QDBusPlatformMenu *menu, QDBusPlatformMenu::topLevelMenus()) {
-- if (menu)
-- populate(menu, depth, propertyNames);
-- }
-+ if (topLevelMenu)
-+ populate(topLevelMenu, depth, propertyNames);
- return 1; // revision
- }
-
-- const QDBusPlatformMenu *menu = QDBusPlatformMenu::byId(id);
-- if (!menu) {
-- QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);
-- if (item)
-- menu = static_cast<const QDBusPlatformMenu *>(item->menu());
-+ QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);
-+ if (item) {
-+ const QDBusPlatformMenu *menu = static_cast<const QDBusPlatformMenu *>(item->menu());
-+
-+ if (menu) {
-+ if (depth != 0)
-+ populate(menu, depth, propertyNames);
-+ return menu->revision();
-+ }
- }
-- if (depth != 0 && menu)
-- populate(menu, depth, propertyNames);
-- if (menu)
-- return menu->revision();
-
- return 1; // revision
- }
-@@ -117,11 +115,13 @@
-
- void QDBusMenuLayoutItem::populate(const QDBusPlatformMenuItem *item, int depth, const QStringList &propertyNames)
- {
-- Q_UNUSED(depth)
-- Q_UNUSED(propertyNames)
- m_id = item->dbusID();
- QDBusMenuItem proxy(item);
- m_properties = proxy.m_properties;
-+
-+ const QDBusPlatformMenu *menu = static_cast<const QDBusPlatformMenu *>(item->menu());
-+ if (depth != 0 && menu)
-+ populate(menu, depth, propertyNames);
- }
-
- const QDBusArgument &operator<<(QDBusArgument &arg, const QDBusMenuLayoutItem &item)
-@@ -199,8 +199,7 @@
- m_properties.insert(QLatin1String("icon-data"), buf.data());
- }
- }
-- if (!item->isVisible())
-- m_properties.insert(QLatin1String("visible"), false);
-+ m_properties.insert(QLatin1String("visible"), item->isVisible());
- }
-
- QDBusMenuItemList QDBusMenuItem::items(const QList<int> &ids, const QStringList &propertyNames)
---- a/src/platformsupport/dbusmenu/qdbusmenutypes_p.h
-+++ b/src/platformsupport/dbusmenu/qdbusmenutypes_p.h
-@@ -94,7 +94,7 @@
- class QDBusMenuLayoutItem
- {
- public:
-- uint populate(int id, int depth, const QStringList &propertyNames);
-+ uint populate(int id, int depth, const QStringList &propertyNames, const QDBusPlatformMenu *topLevelMenu);
- void populate(const QDBusPlatformMenu *menu, int depth, const QStringList &propertyNames);
- void populate(const QDBusPlatformMenuItem *item, int depth, const QStringList &propertyNames);
-
---- a/src/platformsupport/dbusmenu/qdbusplatformmenu.cpp
-+++ b/src/platformsupport/dbusmenu/qdbusplatformmenu.cpp
-@@ -41,9 +41,7 @@
- Q_LOGGING_CATEGORY(qLcMenu, "qt.qpa.menu")
-
- static int nextDBusID = 1;
--QHash<int, QDBusPlatformMenu *> menusByID;
- QHash<int, QDBusPlatformMenuItem *> menuItemsByID;
--QList<QDBusPlatformMenu *> QDBusPlatformMenu::m_topLevelMenus;
-
- QDBusPlatformMenuItem::QDBusPlatformMenuItem(quintptr tag)
- : m_tag(tag ? tag : reinterpret_cast<quintptr>(this)) // QMenu will overwrite this later
-@@ -85,7 +83,11 @@
- */
- void QDBusPlatformMenuItem::setMenu(QPlatformMenu *menu)
- {
-- m_subMenu = static_cast<QDBusPlatformMenu *>(menu);
-+ if (m_subMenu)
-+ static_cast<QDBusPlatformMenu *>(m_subMenu)->setContainingMenuItem(Q_NULLPTR);
-+ m_subMenu = menu;
-+ if (menu)
-+ static_cast<QDBusPlatformMenu *>(menu)->setContainingMenuItem(this);
- }
-
- void QDBusPlatformMenuItem::setEnabled(bool enabled)
-@@ -130,7 +132,11 @@
-
- QDBusPlatformMenuItem *QDBusPlatformMenuItem::byId(int id)
- {
-- return menuItemsByID[id];
-+ // We need to check contains because otherwise QHash would insert
-+ // a default-constructed nullptr value into menuItemsByID
-+ if (menuItemsByID.contains(id))
-+ return menuItemsByID[id];
-+ return Q_NULLPTR;
- }
-
- QList<const QDBusPlatformMenuItem *> QDBusPlatformMenuItem::byIds(const QList<int> &ids)
-@@ -149,18 +155,13 @@
- , m_isEnabled(true)
- , m_isVisible(true)
- , m_isSeparator(false)
-- , m_dbusID(nextDBusID++)
-- , m_revision(0)
-+ , m_revision(1)
-+ , m_containingMenuItem(Q_NULLPTR)
- {
-- menusByID.insert(m_dbusID, this);
-- // Assume it's top-level until we find out otherwise
-- m_topLevelMenus << this;
- }
-
- QDBusPlatformMenu::~QDBusPlatformMenu()
- {
-- menusByID.remove(m_dbusID);
-- m_topLevelMenus.removeOne(this);
- }
-
- void QDBusPlatformMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before)
-@@ -174,38 +175,59 @@
- else
- m_items.insert(idx, item);
- m_itemsByTag.insert(item->tag(), item);
-- // If a menu is found as a submenu under an item, we know that it's not a top-level menu.
- if (item->menu())
-- m_topLevelMenus.removeOne(const_cast<QDBusPlatformMenu *>(static_cast<const QDBusPlatformMenu *>(item->menu())));
-+ syncSubMenu(static_cast<const QDBusPlatformMenu *>(item->menu()));
-+ emitUpdated();
- }
-
- void QDBusPlatformMenu::removeMenuItem(QPlatformMenuItem *menuItem)
- {
-- m_items.removeAll(static_cast<QDBusPlatformMenuItem *>(menuItem));
-+ QDBusPlatformMenuItem *item = static_cast<QDBusPlatformMenuItem *>(menuItem);
-+ m_items.removeAll(item);
- m_itemsByTag.remove(menuItem->tag());
-+ if (item->menu()) {
-+ // disconnect from the signals we connected to in syncSubMenu()
-+ const QDBusPlatformMenu *menu = static_cast<const QDBusPlatformMenu *>(item->menu());
-+ disconnect(menu, &QDBusPlatformMenu::propertiesUpdated,
-+ this, &QDBusPlatformMenu::propertiesUpdated);
-+ disconnect(menu, &QDBusPlatformMenu::updated,
-+ this, &QDBusPlatformMenu::updated);
-+ }
-+ emitUpdated();
-+}
-+
-+void QDBusPlatformMenu::syncSubMenu(const QDBusPlatformMenu *menu)
-+{
-+ // The adaptor is only connected to the propertiesUpdated signal of the top-level
-+ // menu, so the submenus should transfer their signals to their parents.
-+ connect(menu, &QDBusPlatformMenu::propertiesUpdated,
-+ this, &QDBusPlatformMenu::propertiesUpdated, Qt::UniqueConnection);
-+ connect(menu, &QDBusPlatformMenu::updated,
-+ this, &QDBusPlatformMenu::updated, Qt::UniqueConnection);
- }
-
- void QDBusPlatformMenu::syncMenuItem(QPlatformMenuItem *menuItem)
- {
-+ QDBusPlatformMenuItem *item = static_cast<QDBusPlatformMenuItem *>(menuItem);
-+ // if a submenu was added to this item, we need to connect to its signals
-+ if (item->menu())
-+ syncSubMenu(static_cast<const QDBusPlatformMenu *>(item->menu()));
- // TODO keep around copies of the QDBusMenuLayoutItems so they can be updated?
- // or eliminate them by putting dbus streaming operators in this class instead?
- // or somehow tell the dbusmenu client that something has changed, so it will ask for properties again
-- emitUpdated();
- QDBusMenuItemList updated;
- QDBusMenuItemKeysList removed;
-- updated << QDBusMenuItem(static_cast<QDBusPlatformMenuItem *>(menuItem));
-+ updated << QDBusMenuItem(item);
- qCDebug(qLcMenu) << updated;
- emit propertiesUpdated(updated, removed);
- }
-
--QDBusPlatformMenu *QDBusPlatformMenu::byId(int id)
--{
-- return menusByID[id];
--}
--
- void QDBusPlatformMenu::emitUpdated()
- {
-- emit updated(++m_revision, m_dbusID);
-+ if (m_containingMenuItem)
-+ emit updated(++m_revision, m_containingMenuItem->dbusID());
-+ else
-+ emit updated(++m_revision, 0);
- }
-
- void QDBusPlatformMenu::setTag(quintptr tag)
-@@ -233,6 +255,11 @@
- m_isVisible = isVisible;
- }
-
-+void QDBusPlatformMenu::setContainingMenuItem(QDBusPlatformMenuItem *item)
-+{
-+ m_containingMenuItem = item;
-+}
-+
- QPlatformMenuItem *QDBusPlatformMenu::menuItemAt(int position) const
- {
- return m_items.at(position);
---- a/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h
-+++ b/src/platformsupport/dbusmenu/qdbusplatformmenu_p.h
-@@ -130,6 +130,7 @@
- ~QDBusPlatformMenu();
- void insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) Q_DECL_OVERRIDE;
- void removeMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE;
-+ void syncSubMenu(const QDBusPlatformMenu *menu);
- void syncMenuItem(QPlatformMenuItem *menuItem) Q_DECL_OVERRIDE;
- void syncSeparatorsCollapsible(bool enable) Q_DECL_OVERRIDE { Q_UNUSED(enable); }
-
-@@ -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); }
--
-- int dbusID() const { return m_dbusID; }
-+ void setContainingMenuItem(QDBusPlatformMenuItem *item);
-
- void showPopup(const QWindow *parentWindow, const QRect &targetRect, const QPlatformMenuItem *item) Q_DECL_OVERRIDE
- {
-@@ -166,9 +166,6 @@
-
- bool operator==(const QDBusPlatformMenu& other) { return m_tag == other.m_tag; }
-
-- static QDBusPlatformMenu* byId(int id);
-- static QList<QDBusPlatformMenu *> topLevelMenus() { return m_topLevelMenus; }
--
- uint revision() const { return m_revision; }
-
- void emitUpdated();
-@@ -184,12 +181,10 @@
- bool m_isEnabled;
- bool m_isVisible;
- bool m_isSeparator;
-- int m_dbusID;
- uint m_revision;
- QHash<quintptr, QDBusPlatformMenuItem *> m_itemsByTag;
- QList<QDBusPlatformMenuItem *> m_items;
- QDBusPlatformMenuItem *m_containingMenuItem;
-- static QList<QDBusPlatformMenu *> m_topLevelMenus;
- };
-
- QT_END_NAMESPACE
diff --git a/debian/patches/dbustray_fixes.diff b/debian/patches/dbustray_fixes.diff
deleted file mode 100644
index d75b0e5..0000000
--- a/debian/patches/dbustray_fixes.diff
+++ /dev/null
@@ -1,80 +0,0 @@
-Description: dbustray: support late registering of tray icon menu
-Origin: upstream,
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=7ad930987da7bb1d
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=a4fac65938fdee74
-Last-Update: 2016-02-20
-
---- a/src/platformsupport/dbusmenu/qdbusmenuconnection.cpp
-+++ b/src/platformsupport/dbusmenu/qdbusmenuconnection.cpp
-@@ -80,6 +80,14 @@
- }
-
- #ifndef QT_NO_SYSTEMTRAYICON
-+bool QDBusMenuConnection::registerTrayIconMenu(QDBusTrayIcon *item)
-+{
-+ bool success = connection().registerObject(MenuBarPath, item->menu());
-+ if (!success) // success == false is normal, because the object may be already registered
-+ qCDebug(qLcMenu) << "failed to register" << item->instanceId() << MenuBarPath;
-+ return success;
-+}
-+
- bool QDBusMenuConnection::registerTrayIcon(QDBusTrayIcon *item)
- {
- bool success = connection().registerService(item->instanceId());
-@@ -95,14 +103,8 @@
- return false;
- }
-
-- if (item->menu()) {
-- success = connection().registerObject(MenuBarPath, item->menu());
-- if (!success) {
-- unregisterTrayIcon(item);
-- qWarning() << "failed to register" << item->instanceId() << MenuBarPath;
-- return false;
-- }
-- }
-+ if (item->menu())
-+ registerTrayIconMenu(item);
-
- QDBusMessage registerMethod = QDBusMessage::createMethodCall(
- StatusNotifierWatcherService, StatusNotifierWatcherPath, StatusNotifierWatcherService,
---- a/src/platformsupport/dbusmenu/qdbusmenuconnection_p.h
-+++ b/src/platformsupport/dbusmenu/qdbusmenuconnection_p.h
-@@ -65,6 +65,7 @@
- QDBusConnection connection() const { return m_connection; }
- bool isStatusNotifierHostRegistered() const { return m_statusNotifierHostRegistered; }
- #ifndef QT_NO_SYSTEMTRAYICON
-+ bool registerTrayIconMenu(QDBusTrayIcon *item);
- bool registerTrayIcon(QDBusTrayIcon *item);
- bool unregisterTrayIcon(QDBusTrayIcon *item);
- #endif // QT_NO_SYSTEMTRAYICON
---- a/src/platformsupport/dbustray/qdbustrayicon.cpp
-+++ b/src/platformsupport/dbustray/qdbustrayicon.cpp
-@@ -184,16 +184,13 @@
-
- QPlatformMenu *QDBusTrayIcon::createMenu() const
- {
-- qCDebug(qLcTray);
-- QDBusPlatformMenu *ret = new QDBusPlatformMenu();
-- if (!m_menu)
-- const_cast<QDBusTrayIcon *>(this)->m_menu = ret;
-- return ret;
-+ return new QDBusPlatformMenu();
- }
-
- void QDBusTrayIcon::updateMenu(QPlatformMenu * menu)
- {
- qCDebug(qLcTray) << menu;
-+ bool needsRegistering = !m_menu;
- if (!m_menu)
- m_menu = qobject_cast<QDBusPlatformMenu *>(menu);
- if (!m_menuAdaptor) {
-@@ -205,6 +202,8 @@
- m_menuAdaptor, SIGNAL(LayoutUpdated(uint,int)));
- }
- m_menu->emitUpdated();
-+ if (needsRegistering)
-+ dBusConnection()->registerTrayIconMenu(this);
- }
-
- void QDBusTrayIcon::showMessage(const QString &title, const QString &msg, const QIcon &icon,
diff --git a/debian/patches/fix_alsa_detection.patch b/debian/patches/fix_alsa_detection.patch
deleted file mode 100644
index 1acad03..0000000
--- a/debian/patches/fix_alsa_detection.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: alsatest: fix the check to treat alsalib 1.1.x as correct version
-Author: Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>
-Author: Dmitry Shachnev <mitya57 at debian.org>
-Bug: https://bugreports.qt.io/browse/QTBUG-51681
-Last-Update: 2016-03-05
-
----
- config.tests/unix/alsa/alsatest.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/config.tests/unix/alsa/alsatest.cpp
-+++ b/config.tests/unix/alsa/alsatest.cpp
-@@ -32,7 +32,7 @@
- ****************************************************************************/
-
- #include <alsa/asoundlib.h>
--#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
-+#if SND_LIB_VERSION < 0x1000a // 1.0.10
- #error "Alsa version found too old, require >= 1.0.10"
- #endif
-
diff --git a/debian/patches/fix_not_delivering_focus.patch b/debian/patches/fix_not_delivering_focus.patch
deleted file mode 100644
index a5a4817..0000000
--- a/debian/patches/fix_not_delivering_focus.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From d44ab0cdca239fbd58c8c824eb1ba06073b1b21c Mon Sep 17 00:00:00 2001
-From: Alexander Bersenev <bay at hackerdom.ru>
-Date: Fri, 6 Nov 2015 01:39:27 +0500
-Subject: [PATCH] xcb: Fix not delivering focusIn event on hide/show
-
-Consider a window which was hidden and shown with hide() and show()
-methods and mouse pointer was in window when hide() was called.
-
-At first, window got focusOutEvent and then Qt library sends X server
-a message to unmap the window.
-
-Then X server will send client two messages:
-1) FocusOut(10) detail=Nonlinear(0x03)
-2) FocusIn(9) detail=Pointer(0x05)
-
-QXcbWindow has a logic for not seting active window to 0 if there is
-a FocusIn coming (see QXcbWindow::doFocusOut).
-
-So QGuiApplicationPrivate::focus_window still points to the current
-window.
-
-Then when show() is called, qt compares previous focus with new focus
-and, since they are equal, doesn't do anything. Event focusInEvent
-isn't delivered to the window.
-
-Here are two links why X server sends FocusIn just after FocusOut:
-http://lists.freedesktop.org/archives/xorg/2008-December/041684.html
-https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html
-
-Proposed fix ignores FocusIn events with detail==Pointer.
-The text of explaining comment is taken from the Chromium project:
-https://chromium.googlesource.com/chromium/src/+/master/ui/views/widget/desktop_aura/x11_desktop_handler.cc
-from X11DesktopHandler::ProcessXEvent function.
-
-[ChangeLog][module][Linux/XCB] Fix not delivering focusIn event on
-hide/show with XCB
-
-Task-number: QTBUG-49071
-Change-Id: I433c8b638834c25f113cc134ee4185778c44f540
----
- src/plugins/platforms/xcb/qxcbwindow.cpp | 21 +++++++++++++++++----
- 1 file changed, 17 insertions(+), 4 deletions(-)
-
---- a/src/plugins/platforms/xcb/qxcbwindow.cpp
-+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
-@@ -894,8 +894,13 @@
- return true;
- }
- uint response_type = event->response_type & ~0x80;
-- if (response_type == XCB_FOCUS_IN)
-- return true;
-+ if (response_type == XCB_FOCUS_IN) {
-+ // Ignore focus events that are being sent only because the pointer is over
-+ // our window, even if the input focus is in a different window.
-+ xcb_focus_in_event_t *e = (xcb_focus_in_event_t *) event;
-+ if (e->detail != XCB_NOTIFY_DETAIL_POINTER)
-+ return true;
-+ }
-
- /* We are also interested in XEMBED_FOCUS_IN events */
- if (response_type == XCB_CLIENT_MESSAGE) {
-@@ -2369,14 +2374,22 @@
- }
- }
-
--void QXcbWindow::handleFocusInEvent(const xcb_focus_in_event_t *)
-+void QXcbWindow::handleFocusInEvent(const xcb_focus_in_event_t *event)
- {
-+ // Ignore focus events that are being sent only because the pointer is over
-+ // our window, even if the input focus is in a different window.
-+ if (event->detail == XCB_NOTIFY_DETAIL_POINTER)
-+ return;
- doFocusIn();
- }
-
-
--void QXcbWindow::handleFocusOutEvent(const xcb_focus_out_event_t *)
-+void QXcbWindow::handleFocusOutEvent(const xcb_focus_out_event_t *event)
- {
-+ // Ignore focus events that are being sent only because the pointer is over
-+ // our window, even if the input focus is in a different window.
-+ if (event->detail == XCB_NOTIFY_DETAIL_POINTER)
-+ return;
- doFocusOut();
- }
-
diff --git a/debian/patches/fix_qtdbus_deadlock.diff b/debian/patches/fix_qtdbus_deadlock.diff
deleted file mode 100644
index 8a526d6..0000000
--- a/debian/patches/fix_qtdbus_deadlock.diff
+++ /dev/null
@@ -1,100 +0,0 @@
-Description: fix QtDBus deadlock inside kded/kiod
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=2e02de165115c9d6
-Last-Update: 2016-03-20
-
---- a/src/dbus/qdbusintegrator.cpp
-+++ b/src/dbus/qdbusintegrator.cpp
-@@ -481,6 +481,11 @@
-
- void QDBusSpyCallEvent::placeMetaCall(QObject *)
- {
-+ invokeSpyHooks(msg, hooks, hookCount);
-+}
-+
-+inline void QDBusSpyCallEvent::invokeSpyHooks(const QDBusMessage &msg, const Hook *hooks, int hookCount)
-+{
- // call the spy hook list
- for (int i = 0; i < hookCount; ++i)
- hooks[i](msg);
-@@ -509,7 +514,12 @@
- {
- if (!ref.load())
- return false;
-- if (!dispatchEnabled && !QDBusMessagePrivate::isLocal(amsg)) {
-+
-+ // local message are always delivered, regardless of filtering
-+ // or whether the dispatcher is enabled
-+ bool isLocal = QDBusMessagePrivate::isLocal(amsg);
-+
-+ if (!dispatchEnabled && !isLocal) {
- // queue messages only, we'll handle them later
- qDBusDebug() << this << "delivery is suspended";
- pendingMessages << amsg;
-@@ -523,13 +533,23 @@
- // let them see the signal too
- return false;
- case QDBusMessage::MethodCallMessage:
-- // run it through the spy filters (if any) before the regular processing
-+ // run it through the spy filters (if any) before the regular processing:
-+ // a) if it's a local message, we're in the caller's thread, so invoke the filter directly
-+ // b) if it's an external message, post to the main thread
- if (Q_UNLIKELY(qDBusSpyHookList.exists()) && qApp) {
- const QDBusSpyHookList &list = *qDBusSpyHookList;
-- qDBusDebug() << this << "invoking message spies";
-- QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this),
-- amsg, list.constData(), list.size()));
-- return true;
-+ if (isLocal) {
-+ Q_ASSERT(QThread::currentThread() != thread());
-+ qDBusDebug() << this << "invoking message spies directly";
-+ QDBusSpyCallEvent::invokeSpyHooks(amsg, list.constData(), list.size());
-+ } else {
-+ qDBusDebug() << this << "invoking message spies via event";
-+ QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this),
-+ amsg, list.constData(), list.size()));
-+
-+ // we'll be called back, so return
-+ return true;
-+ }
- }
-
- handleObjectCall(amsg);
-@@ -1451,9 +1471,9 @@
- // that means the dispatchLock mutex is locked
- // must not call out to user code in that case
- //
-- // however, if the message is internal, handleMessage was called
-- // directly and no lock is in place. We can therefore call out to
-- // user code, if necessary
-+ // however, if the message is internal, handleMessage was called directly
-+ // (user's thread) and no lock is in place. We can therefore call out to
-+ // user code, if necessary.
- ObjectTreeNode result;
- int usedLength;
- QThread *objThread = 0;
-@@ -1492,12 +1512,14 @@
- usedLength, msg));
- return;
- } else if (objThread != QThread::currentThread()) {
-- // synchronize with other thread
-+ // looped-back message, targeting another thread:
-+ // synchronize with it
- postEventToThread(HandleObjectCallPostEventAction, result.obj,
- new QDBusActivateObjectEvent(QDBusConnection(this), this, result,
- usedLength, msg, &sem));
- semWait = true;
- } else {
-+ // looped-back message, targeting current thread
- semWait = false;
- }
- } // release the lock
---- a/src/dbus/qdbusintegrator_p.h
-+++ b/src/dbus/qdbusintegrator_p.h
-@@ -145,6 +145,7 @@
- {}
- ~QDBusSpyCallEvent();
- void placeMetaCall(QObject *) Q_DECL_OVERRIDE;
-+ static inline void invokeSpyHooks(const QDBusMessage &msg, const Hook *hooks, int hookCount);
-
- QDBusConnection conn; // keeps the refcount in QDBusConnectionPrivate up
- QDBusMessage msg;
diff --git a/debian/patches/gnukfreebsd.diff b/debian/patches/gnukfreebsd.diff
index 61e168f..99a8f52 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
-@@ -171,6 +171,8 @@
+@@ -184,6 +184,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/series b/debian/patches/series
index 8067fed..2bb693a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,13 +1,8 @@
# Backported from upstream
-dbusmenu_fixes.diff
-dbustray_fixes.diff
no_dbus_dependency.diff
-fix_not_delivering_focus.patch
-fix_qtdbus_deadlock.diff
# Debian specific.
gnukfreebsd.diff
no_htmlinfo_example.diff
remove_privacy_breachs.diff
link_fbclient.diff
-fix_alsa_detection.patch
--
qtbase packaging
More information about the pkg-kde-commits
mailing list