Hello community, here is the log from the commit of package libqt5-qtbase for openSUSE:Factory checked in at 2015-02-20 12:43:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-02-06 10:19:35.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libqt5-qtbase.new/libqt5-qtbase.changes 2015-02-20 12:43:01.000000000 +0100 @@ -1,0 +2,17 @@ +Wed Feb 18 01:41:07 UTC 2015 - hrvoje.sen...@gmail.com + +- Added patches from upstream: + Fix-Meta-shortcuts-on-XCB.patch (qtbug#43572), + Fix-detection-of-GCC5.patch, + Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch + (qtbug#43688), Fix-typo-in-Qt5CoreMacroscmake.patch, + Make-sure-theres-a-scene-before-using-it.patch (qtbug#44509), + Multi-screen-DPI-support-for-X11.patch (qtbug#43713), + QSystemTrayIcon-handle-submenus-correctly.patch, + Update-mouse-buttons-from-MotionNotify-events.patch + (qtbug#32609, qtbug#35065, qtbug#43776, qtbug#44166, qtbug#44231), + X11-devicePixelRatio-screen-mapping-fix.patch (qtbug#43713) and + xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch + (qtcreatorbug#9589) + +------------------------------------------------------------------- New: ---- Fix-Meta-shortcuts-on-XCB.patch Fix-detection-of-GCC5.patch Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch Fix-typo-in-Qt5CoreMacroscmake.patch Make-sure-theres-a-scene-before-using-it.patch Multi-screen-DPI-support-for-X11.patch QSystemTrayIcon-handle-submenus-correctly.patch Update-mouse-buttons-from-MotionNotify-events.patch X11-devicePixelRatio-screen-mapping-fix.patch xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt5-qtbase.spec ++++++ --- /var/tmp/diff_new_pack.4nUhxn/_old 2015-02-20 12:43:04.000000000 +0100 +++ /var/tmp/diff_new_pack.4nUhxn/_new 2015-02-20 12:43:04.000000000 +0100 @@ -67,7 +67,28 @@ Patch2001: qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch # PATCH-FIX-UPSTREAM Fix-use-after-free-bug.patch Patch2002: Fix-use-after-free-bug.patch +# PATCH-FIX-UPSTREAM fix-drag-and-drop-regression.patch Patch2003: fix-drag-and-drop-regression.patch +# PATCH-FIX-UPSTREAM Fix-detection-of-GCC5.patch +Patch2004: Fix-detection-of-GCC5.patch +# PATCH-FIX-UPSTREAM Fix-typo-in-Qt5CoreMacroscmake.patch +Patch2005: Fix-typo-in-Qt5CoreMacroscmake.patch +# PATCH-FIX-UPSTREAM Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch +Patch2006: Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch +# PATCH-FIX-UPSTREAM X11-devicePixelRatio-screen-mapping-fix.patch +Patch2007: X11-devicePixelRatio-screen-mapping-fix.patch +# PATCH-FIX-UPSTREAM Multi-screen-DPI-support-for-X11.patch +Patch2008: Multi-screen-DPI-support-for-X11.patch +# PATCH-FIX-UPSTREAM xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch +Patch2009: xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch +# PATCH-FIX-UPSTREAM QSystemTrayIcon-handle-submenus-correctly.patch +Patch2010: QSystemTrayIcon-handle-submenus-correctly.patch +# PATCH-FIX-UPSTREAM Fix-Meta-shortcuts-on-XCB.patch +Patch2011: Fix-Meta-shortcuts-on-XCB.patch +# PATCH-FIX-UPSTREAM Update-mouse-buttons-from-MotionNotify-events.patch +Patch2012: Update-mouse-buttons-from-MotionNotify-events.patch +# PATCH-FIX-UPSTREAM Make-sure-theres-a-scene-before-using-it.patch +Patch2013: Make-sure-theres-a-scene-before-using-it.patch BuildRequires: alsa-devel BuildRequires: cups-devel BuildRequires: gcc-c++ @@ -158,6 +179,16 @@ %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 +%patch2005 -p1 +%patch2006 -p1 +%patch2007 -p1 +%patch2008 -p1 +%patch2009 -p1 +%patch2010 -p1 +%patch2011 -p1 +%patch2012 -p1 +%patch2013 -p1 # be sure not to use them rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib} ++++++ Fix-Meta-shortcuts-on-XCB.patch ++++++ From: Kåre Särs <kare.s...@iki.fi> Date: Thu, 22 Jan 2015 20:40:37 +0000 Subject: Fix Meta+... shortcuts on XCB X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=0d990b9ca117514fe83f53b39f25d6272304f2fb --- Fix Meta+... shortcuts on XCB If the window contains a widget that accepts text input, a Meta+... shortcut will be interpreted as if no modifier was pressed. This fix enables the usage of Meta+... shortcuts for the XCB platform plugin. Change-Id: I80034b7e6bbbf18471c86fc77320d5038f5740be Task-number: QTBUG-43572 Reviewed-by: Aleix Pol Gonzalez <aleix...@kde.org> Reviewed-by: Milian Wolff <milian.wo...@kdab.com> Reviewed-by: David Edmundson <davidedmund...@kde.org> Reviewed-by: Lars Knoll <lars.kn...@digia.com> --- --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -933,7 +933,7 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const { // turn off the modifier bits which doesn't participate in shortcuts - Qt::KeyboardModifiers notNeeded = Qt::MetaModifier | Qt::KeypadModifier | Qt::GroupSwitchModifier; + Qt::KeyboardModifiers notNeeded = Qt::KeypadModifier | Qt::GroupSwitchModifier; Qt::KeyboardModifiers modifiers = event->modifiers() &= ~notNeeded; // create a fresh kb state and test against the relevant modifier combinations struct xkb_state *kb_state = xkb_state_new(xkb_keymap); @@ -963,10 +963,12 @@ xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift"); xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt"); xkb_mod_index_t controlMod = xkb_keymap_mod_get_index(xkb_keymap, "Control"); + xkb_mod_index_t metaMod = xkb_keymap_mod_get_index(xkb_keymap, "Meta"); Q_ASSERT(shiftMod < 32); Q_ASSERT(altMod < 32); Q_ASSERT(controlMod < 32); + Q_ASSERT(metaMod < 32); xkb_mod_mask_t depressed; int qtKey = 0; @@ -987,6 +989,8 @@ depressed |= (1 << shiftMod); if (neededMods & Qt::ControlModifier) depressed |= (1 << controlMod); + if (neededMods & Qt::MetaModifier) + depressed |= (1 << metaMod); xkb_state_update_mask(kb_state, depressed, latchedMods, lockedMods, 0, 0, lockedLayout); sym = xkb_state_key_get_one_sym(kb_state, keycode); } ++++++ Fix-detection-of-GCC5.patch ++++++ From: Thiago Macieira <thiago.macie...@intel.com> Date: Sat, 29 Nov 2014 00:06:18 +0000 Subject: Configure: Fix detection of GCC 5 X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=9fb4c2c412621b63c06dbbd899f44041b2e126c2 --- Configure: Fix detection of GCC 5 $ gcc-5 -dumpversion 5 No dots. Change-Id: I5dd547f257718c981e7be64fca3eec980136ba3e Reviewed-by: Oswald Buddenhagen <oswald.buddenha...@theqtcompany.com> --- --- a/configure +++ b/configure @@ -6031,6 +6031,10 @@ QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'` QT_GCC_PATCH_VERSION=0 ;; + *) + QT_GCC_MAJOR_VERSION=$COMPILER_VERSION + QT_GCC_MINOR_VERSION=0 + QT_GCC_PATCH_VERSION=0 esac ;; ++++++ Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch ++++++ From: Paul Olav Tvete <paul.tv...@theqtcompany.com> Date: Wed, 07 Jan 2015 14:19:07 +0000 Subject: Fix physical DPI and size for rotated screens on X11 X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=e6699afbee77b853773579d29d78a1ade2a4ab2c --- Fix physical DPI and size for rotated screens on X11 Rotated screens would use the unrotated physical geometry, causing the calculated physical DPI to be completely wrong. In RandR, the output does not rotate, so the physical size is always for the unrotated display. The transformation is done on the crtc. http://www.x.org/releases/X11R7.6/doc/randrproto/randrproto.txt Task-number: QTBUG-43688 Change-Id: Ifde192fcc99a37d0bfd6d57b4cdeac124a054ca3 Reviewed-by: Friedemann Kleint <friedemann.kle...@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutle...@digia.com> Reviewed-by: Uli Schlachter <psyc...@znc.in> --- --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -53,7 +53,7 @@ , m_screen(scr) , m_crtc(output ? output->crtc : 0) , m_outputName(outputName) - , m_sizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize()) + , m_outputSizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize()) , m_virtualSize(scr->width_in_pixels, scr->height_in_pixels) , m_virtualSizeMillimeters(scr->width_in_millimeters, scr->height_in_millimeters) , m_orientation(Qt::PrimaryOrientation) @@ -71,6 +71,7 @@ updateGeometry(output ? output->timestamp : 0); updateRefreshRate(); + const int dpr = int(devicePixelRatio()); // On VNC, it can be that physical size is unknown while // virtual size is known (probably back-calculated from DPI and resolution) @@ -93,6 +94,7 @@ qDebug(" virtual height.: %lf", m_virtualSizeMillimeters.height()); qDebug(" virtual geom...: %d x %d", m_virtualSize.width(), m_virtualSize.height()); qDebug(" avail virt geom: %d x %d +%d +%d", m_availableGeometry.width(), m_availableGeometry.height(), m_availableGeometry.x(), m_availableGeometry.y()); + qDebug(" orientation....: %d", m_orientation); qDebug(" pixel ratio....: %d", m_devicePixelRatio); qDebug(" depth..........: %d", screen()->root_depth); qDebug(" white pixel....: %x", screen()->white_pixel); @@ -413,6 +415,24 @@ if (crtc) { xGeometry = QRect(crtc->x, crtc->y, crtc->width, crtc->height); xAvailableGeometry = xGeometry; + switch (crtc->rotation) { + case XCB_RANDR_ROTATION_ROTATE_0: // xrandr --rotate normal + m_orientation = Qt::LandscapeOrientation; + m_sizeMillimeters = m_outputSizeMillimeters; + break; + case XCB_RANDR_ROTATION_ROTATE_90: // xrandr --rotate left + m_orientation = Qt::PortraitOrientation; + m_sizeMillimeters = m_outputSizeMillimeters.transposed(); + break; + case XCB_RANDR_ROTATION_ROTATE_180: // xrandr --rotate inverted + m_orientation = Qt::InvertedLandscapeOrientation; + m_sizeMillimeters = m_outputSizeMillimeters; + break; + case XCB_RANDR_ROTATION_ROTATE_270: // xrandr --rotate right + m_orientation = Qt::InvertedPortraitOrientation; + m_sizeMillimeters = m_outputSizeMillimeters.transposed(); + break; + } free(crtc); } } --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -111,6 +111,7 @@ xcb_screen_t *m_screen; xcb_randr_crtc_t m_crtc; QString m_outputName; + QSizeF m_outputSizeMillimeters; QSizeF m_sizeMillimeters; QRect m_geometry; QRect m_availableGeometry; ++++++ Fix-typo-in-Qt5CoreMacroscmake.patch ++++++ From: Aleix Pol <aleix...@kde.org> Date: Mon, 22 Dec 2014 15:34:54 +0000 Subject: Fix typo in Qt5CoreMacros.cmake X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=c63bb90ac7224927b56197d80252c79d01ff3b6f --- Fix typo in Qt5CoreMacros.cmake According to the documentation, the argument is called COPYONLY instead of COPY_ONLY. Fixes warning and ensures it works properly. Change-Id: I643f5ea808aaaf94c3ee666ec39485e84ed38df1 Reviewed-by: Vishesh Handa <vha...@kde.org> Reviewed-by: Milian Wolff <milian.wo...@kdab.com> --- --- a/src/corelib/Qt5CoreMacros.cmake +++ b/src/corelib/Qt5CoreMacros.cmake @@ -221,7 +221,7 @@ # let's make a configured file and add it as a dependency so cmake is run # again when dependencies need to be recomputed. qt5_make_output_file("${infile}" "" "qrc.depends" out_depends) - configure_file("${infile}" "${out_depends}" COPY_ONLY) + configure_file("${infile}" "${out_depends}" COPYONLY) else() # The .qrc file does not exist (yet). Let's add a dependency and hope # that it will be generated later ++++++ Make-sure-theres-a-scene-before-using-it.patch ++++++ From: Albert Astals Cid <albert.ast...@canonical.com> Date: Tue, 17 Feb 2015 08:53:27 +0000 Subject: Make sure there's a scene before using it X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8fccfef424e7d2b7a2019b1f828234145d4011df --- Make sure there's a scene before using it Fixes crash hovering links in quassel Task-number: QTBUG-44509 Change-Id: I77d8d9118ad185ed70a46e91445e2960200e562b Reviewed-by: Michael Brüning <michael.brun...@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladh...@theqtcompany.com> Reviewed-by: Marc Mutz <marc.m...@kdab.com> --- --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -12272,7 +12272,7 @@ { #ifndef QT_NO_GRAPHICSVIEW Q_D(const QWidget); - if (d->extra && d->extra->proxyWidget) { + if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { const QList <QGraphicsView *> views = d->extra->proxyWidget->scene()->views(); if (!views.isEmpty()) { const QPointF scenePos = d->extra->proxyWidget->mapToScene(pos); @@ -12307,7 +12307,7 @@ { #ifndef QT_NO_GRAPHICSVIEW Q_D(const QWidget); - if (d->extra && d->extra->proxyWidget) { + if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { const QList <QGraphicsView *> views = d->extra->proxyWidget->scene()->views(); if (!views.isEmpty()) { const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(pos); ++++++ Multi-screen-DPI-support-for-X11.patch ++++++ From: Paul Olav Tvete <paul.tv...@theqtcompany.com> Date: Thu, 08 Jan 2015 12:55:32 +0000 Subject: Multi-screen DPI support for X11 X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=3f0b8a9f198cd1e0e8ae9150561f93fb1b931b7e --- Multi-screen DPI support for X11 Calculate the logical DPI independently per screen, but only when auto dpr is enabled. Using a constant DPI value for all screens, based on the combined geometry is arguably incorrect, but changing this now will cause pixel-size fonts to behave visibly different from point-size fonts when moving the window to a different screen. However, with QT_DEVICE_PIXEL_RATIO=auto, the pixel size fonts are already changing when the devicePixelRatio changes. Without this change, the point-size fonts will *not* adapt, which is a clear bug. Task-number: QTBUG-43713 Change-Id: I3e71618f9d55b7828ccd70b69a7b7ce656c69d65 Reviewed-by: Friedemann Kleint <friedemann.kle...@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.l...@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausm...@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutle...@digia.com> --- --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -317,8 +317,14 @@ if (m_forcedDpi > 0) return QDpi(m_forcedDpi/dpr, m_forcedDpi/dpr); - return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width() / dpr, - Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height() / dpr); + static const bool auto_dpr = qgetenv("QT_DEVICE_PIXEL_RATIO").toLower() == "auto"; + if (auto_dpr) { + return QDpi(Q_MM_PER_INCH * m_geometry.width() / m_sizeMillimeters.width(), + Q_MM_PER_INCH * m_geometry.height() / m_sizeMillimeters.height()); + } else { + return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width() / dpr, + Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height() / dpr); + } } ++++++ QSystemTrayIcon-handle-submenus-correctly.patch ++++++ From: Dmitry Shachnev <mity...@gmail.com> Date: Sun, 11 Jan 2015 09:05:55 +0000 Subject: QSystemTrayIcon: handle submenus correctly X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=03dc2b2e82750d1c531cf00a406368cde4a8928b --- QSystemTrayIcon: handle submenus correctly This fixes a bug when submenus are shown as simple actions when a platform system tray icon is used. To correctly handle submenus, we need to set platform menus on all submenus, and only then on a parent menu. Change-Id: If2bfcc703b938dbb14ba4b9aa810039ced07e946 Reviewed-by: Friedemann Kleint <friedemann.kle...@theqtcompany.com> Reviewed-by: Dimitrios Glentadakis <dgl...@free.fr> Reviewed-by: Shawn Rutledge <shawn.rutle...@digia.com> --- --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -37,6 +37,7 @@ #ifndef QT_NO_SYSTEMTRAYICON #include "qmenu.h" +#include "qlist.h" #include "qevent.h" #include "qpoint.h" #include "qlabel.h" @@ -704,11 +705,7 @@ void QSystemTrayIconPrivate::updateMenu_sys_qpa() { if (menu) { - if (!menu->platformMenu()) { - QPlatformMenu *platformMenu = qpa_sys->createMenu(); - if (platformMenu) - menu->setPlatformMenu(platformMenu); - } + addPlatformMenu(menu); qpa_sys->updateMenu(menu->platformMenu()); } } @@ -741,6 +738,27 @@ static_cast<QPlatformSystemTrayIcon::MessageIcon>(icon), msecs); } +void QSystemTrayIconPrivate::addPlatformMenu(QMenu *menu) const +{ + if (menu->platformMenu()) + return; // The platform menu already exists. + + // The recursion depth is the same as menu depth, so should not + // be higher than 3 levels. + QListIterator<QAction *> it(menu->actions()); + while (it.hasNext()) { + QAction *action = it.next(); + if (action->menu()) + addPlatformMenu(action->menu()); + } + + // This menu should be processed *after* its children, otherwise + // setMenu() is not called on respective QPlatformMenuItems. + QPlatformMenu *platformMenu = qpa_sys->createMenu(); + if (platformMenu) + menu->setPlatformMenu(platformMenu); +} + QT_END_NAMESPACE #endif // QT_NO_SYSTEMTRAYICON --- a/src/widgets/util/qsystemtrayicon_p.h +++ b/src/widgets/util/qsystemtrayicon_p.h @@ -99,6 +99,7 @@ void updateMenu_sys_qpa(); QRect geometry_sys_qpa() const; void showMessage_sys_qpa(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs); + void addPlatformMenu(QMenu *menu) const; }; class QBalloonTip : public QWidget ++++++ Update-mouse-buttons-from-MotionNotify-events.patch ++++++ From: Alexander Volkov <a.vol...@rusbitech.ru> Date: Mon, 09 Feb 2015 14:19:14 +0000 Subject: xcb: Update mouse buttons from MotionNotify events X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=76de1ac0a4cd384f608a14b5d77a8cf3ef1ec868 --- xcb: Update mouse buttons from MotionNotify events We don't receive ButtonRelease event after closing a popup by clicking outside of the client area. Thus the internal state of mouse buttons in the xcb plugin becomes outdated until we receive ButtonRelease event. This commit updates the internal state of mouse buttons from MotionNotify events. So when a user will move a mouse on the client area, the xcb plugin will send a mouse event with updated buttons to Qt Gui and QGuiApplication will detect the following mouse events correctly. Task-number: QTBUG-32609 Task-number: QTBUG-35065 Task-number: QTBUG-43776 Task-number: QTBUG-44166 Task-number: QTBUG-44231 Change-Id: Ica334dfbf04f7ef81db86b25262328fe5da11808 Reviewed-by: Allan Sandfeld Jensen <allan.jen...@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutle...@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeg...@digia.com> --- --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -818,6 +818,15 @@ qCDebug(lcQpaXInput, "xcb: released mouse button %d, button state %X", event->detail, static_cast<unsigned int>(m_buttons)); } +void QXcbConnection::handleMotionNotify(xcb_generic_event_t *ev) +{ + xcb_motion_notify_event_t *event = (xcb_motion_notify_event_t *)ev; + + m_buttons = (m_buttons & ~0x7) | translateMouseButtons(event->state); + if (Q_UNLIKELY(lcQpaXInput().isDebugEnabled())) + qDebug("xcb: moved mouse to %4d, %4d; button state %X", event->event_x, event->event_y, static_cast<unsigned int>(m_buttons)); +} + #ifndef QT_NO_XKB namespace { typedef union { @@ -868,11 +877,8 @@ handleButtonRelease(event); HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_release_event_t, event, handleButtonReleaseEvent); case XCB_MOTION_NOTIFY: - if (Q_UNLIKELY(lcQpaXInput().isDebugEnabled())) { - xcb_motion_notify_event_t *mev = (xcb_motion_notify_event_t *)event; - qDebug("xcb: moved mouse to %4d, %4d; button state %X", mev->event_x, mev->event_y, static_cast<unsigned int>(m_buttons)); - } m_keyboard->updateXKBStateFromCore(((xcb_motion_notify_event_t *)event)->state); + handleMotionNotify(event); HANDLE_PLATFORM_WINDOW_EVENT(xcb_motion_notify_event_t, event, handleMotionNotifyEvent); case XCB_CONFIGURE_NOTIFY: HANDLE_PLATFORM_WINDOW_EVENT(xcb_configure_notify_event_t, event, handleConfigureNotifyEvent); --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -496,6 +496,7 @@ void updateScreens(); void handleButtonPress(xcb_generic_event_t *event); void handleButtonRelease(xcb_generic_event_t *event); + void handleMotionNotify(xcb_generic_event_t *event); bool m_xi2Enabled; int m_xi2Minor; ++++++ X11-devicePixelRatio-screen-mapping-fix.patch ++++++ From: Paul Olav Tvete <paul.tv...@theqtcompany.com> Date: Wed, 07 Jan 2015 14:44:12 +0000 Subject: X11 devicePixelRatio screen mapping fix X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=075ae987c48ce732e6a22c1eba71023fa0ea1775 --- X11 devicePixelRatio screen mapping fix Fix screen detection and window geometry when screens have different displayPixelRatios. We must use the native coordinate system to figure out which screen a window belongs to. Also, when a window moves to a screen with a different devicePixelRatio, we must recalculate the Qt geometry. Task-number: QTBUG-43713 Change-Id: I93063e37354ff88f3c8a13320b76dfb272e43a9c Reviewed-by: Jørgen Lind <jorgen.l...@theqtcompany.com> --- --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -77,8 +77,10 @@ // virtual size is known (probably back-calculated from DPI and resolution) if (m_sizeMillimeters.isEmpty()) m_sizeMillimeters = m_virtualSizeMillimeters; - if (m_geometry.isEmpty()) + if (m_geometry.isEmpty()) { m_geometry = QRect(QPoint(), m_virtualSize/dpr); + m_nativeGeometry = QRect(QPoint(), m_virtualSize); + } if (m_availableGeometry.isEmpty()) m_availableGeometry = m_geometry; @@ -461,6 +463,7 @@ m_devicePixelRatio = qRound(dpi/96); const int dpr = int(devicePixelRatio()); // we may override m_devicePixelRatio m_geometry = QRect(xGeometry.topLeft()/dpr, xGeometry.size()/dpr); + m_nativeGeometry = QRect(xGeometry.topLeft(), xGeometry.size()); m_availableGeometry = QRect(xAvailableGeometry.topLeft()/dpr, xAvailableGeometry.size()/dpr); QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -62,6 +62,7 @@ QWindow *topLevelAt(const QPoint &point) const; QRect geometry() const { return m_geometry; } + QRect nativeGeometry() const { return m_nativeGeometry; } QRect availableGeometry() const {return m_availableGeometry;} int depth() const { return m_screen->root_depth; } QImage::Format format() const; @@ -114,6 +115,7 @@ QSizeF m_outputSizeMillimeters; QSizeF m_sizeMillimeters; QRect m_geometry; + QRect m_nativeGeometry; QRect m_availableGeometry; QSize m_virtualSize; QSizeF m_virtualSizeMillimeters; --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1831,6 +1831,23 @@ } } +// Temporary workaround for bug in QPlatformScreen::screenForNativeGeometry +// we need the native geometries to detect our screen, but that's not +// available in cross-platform code. Will be fixed properly when highDPI +// support is refactored to expose the native coordinate system. + +QPlatformScreen *QXcbWindow::screenForNativeGeometry(const QRect &newGeometry) const +{ + QXcbScreen *currentScreen = static_cast<QXcbScreen*>(screen()); + if (!parent() && !currentScreen->nativeGeometry().intersects(newGeometry)) { + Q_FOREACH (QPlatformScreen* screen, currentScreen->virtualSiblings()) { + if (static_cast<QXcbScreen*>(screen)->nativeGeometry().intersects(newGeometry)) + return screen; + } + } + return currentScreen; +} + void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event) { bool fromSendEvent = (event->response_type & 0x80); @@ -1847,15 +1864,23 @@ } } - QRect rect = mapFromNative(QRect(pos, QSize(event->width, event->height)), int(devicePixelRatio())); + const int dpr = devicePixelRatio(); + const QRect nativeRect = QRect(pos, QSize(event->width, event->height)); + const QRect rect = mapFromNative(nativeRect, dpr); QPlatformWindow::setGeometry(rect); QWindowSystemInterface::handleGeometryChange(window(), rect); - QPlatformScreen *newScreen = screenForGeometry(rect); + QPlatformScreen *newScreen = screenForNativeGeometry(nativeRect); if (newScreen != m_screen) { m_screen = static_cast<QXcbScreen*>(newScreen); QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen()); + int newDpr = devicePixelRatio(); + if (newDpr != dpr) { + QRect newRect = mapFromNative(nativeRect, newDpr); + QPlatformWindow::setGeometry(newRect); + QWindowSystemInterface::handleGeometryChange(window(), newRect); + } } m_configureNotifyPending = false; --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -154,6 +154,8 @@ qreal devicePixelRatio() const; + QPlatformScreen *screenForNativeGeometry(const QRect &newGeometry) const; + public Q_SLOTS: void updateSyncRequestCounter(); ++++++ xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch ++++++ From: Alexander Volkov <a.vol...@rusbitech.ru> Date: Fri, 12 Dec 2014 11:37:36 +0000 Subject: xcb: Don't return 0 from QXcbKeyboard::possibleKeys X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8a075c405709eab9c08ed4230d795ca45eabd5a7 --- xcb: Don't return 0 from QXcbKeyboard::possibleKeys It's possible to get 0 for baseQtKey in case Caps Lock is used as a layout switcher. So don't include this value in the result. Similar fix was in commit d904533acba1267431ca2c5f0d3e85cc59a20a26. Task-number: QTCREATORBUG-9589 Change-Id: I46fc91f9faf6fd0699f062a72fd2ca3187232f5a Reviewed-by: Jørgen Lind <jorgen.l...@theqtcompany.com> --- --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -957,7 +957,8 @@ QList<int> result; int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode)); - result += (baseQtKey + modifiers); // The base key is _always_ valid, of course + if (baseQtKey) + result += (baseQtKey + modifiers); xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift"); xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt"); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org