summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* | QCocoaWindow: fix geometry issue when only minimumSize is setOleg Yadrov2017-03-183-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | When only minimumSize was set and it matched to the size NSView was created with, viewDidChangeFrame() was not called for the window and it's internal geometry value was still (0, 0) what led to unpleasant side effects such as QML content was not displayed until something caused an update. Task-number: QTBUG-58963 Change-Id: Ib12d36d405969971e7ff62b79b50c3d78928a649 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Include missing errno.hAllan Sandfeld Jensen2017-03-181-0/+2
| | | | | | | | | | | | | | Fixes linux-clang-libc++ builds. Change-Id: Id75c35d858123193e7d29b0bbb113d2c109a7560 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | QNSView: Harden logic around platform window accessGabriel de Dietrich2017-03-162-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users have reported crashes in -[QNSView mouseEnteredImpl:] which we believe are due to null m_platformWindow. The stack traces are like the one below or similar: 0 libqcocoa_dylib QNSView mouseEnteredImpl_ 0x1F 1 appkit NSTrackingArea _dispatchMouseEntered_ 0xA2 2 appkit NSApplication sendEvent_ 0xF4D 3 libqcocoa_dylib QNSApplication sendEvent_ 0x4E 4 libqcocoa_dylib QCocoaEventDispatcher processEvents 0x184 5 qtcore QEventLoop exec 0x19C 6 qtwidgets QDialog exec 0x20B Moreover, since 2f505b79a49bdf5ba8d084e13ab339bcf956c849, that member is a QPointer, so we should do more systematic checks. Change-Id: Iced447515a4ae07a62734e587f5b08d46d313071 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | warn of blacklisted GLX OpenGL renderers and vendorsJeremy Katz2017-03-161-0/+16
| | | | | | | | | | | | | | | | Notify users when multithreaded OpenGL is disabled due to the renderer or vendor blacklist. Change-Id: I16a80568afe87b227575102ca839f18050613e90 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | xcb: send keyboard modifiers with every QTabletEventShawn Rutledge2017-03-141-3/+4
| | | | | | | | | | | | Task-number: QTBUG-59415 Change-Id: If64a6513131fd85189e3621cb2a105e80e919ecf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-1313-31/+50
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * put load(qt_plugin) at end of project fileOswald Buddenhagen2017-03-061-5/+5
| | | | | | | | | | | | | | amends a28364bc1. Change-Id: I8e6044abcbfffde8688d87cd3aa722c0c362534c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-065-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * xcb: fix misuse of xcb_send_eventGatis Paeglis2017-03-014-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following Valgrind warning: "Syscall param writev(vector[...]) points to uninitialised byte(s) Uninitialised value was created by a stack allocation" The xcb_send_event() requires all events to have 32 bytes. It calls memcpy() on the passed in event. If the passed in event is less than 32 bytes, memcpy() reaches into unrelated memory. And as it turns out, this behavior is actually described in the xcb_send_event function's documentation. This patch adds a macro that declares an event for safe usage with xcb_send_event. Change-Id: Ifcaab5e9a3b52b7f64ac930b423e0c7798bbfedb Done-with: Uli Schlachter Task-number: QTBUG-56518 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Fix wrong codec with MySQL plugin in newer versionsJoni Poikelin2017-02-281-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Since MySQL now properly supports UTF-8 through utf8mb4 option, it caused regression on systems which did not use UTF-8 encoding by default which caused queries to fail as they were converted into system codec. To fix this, simply use UTF-8 encoding for queries when MySQL supports it. Task-number: QTBUG-59176 Change-Id: I21cc9102b15df15a31bc7c74469321c44a257946 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * streamline libdl detection and linkingOswald Buddenhagen2017-02-273-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of having a library and a test, use a library with two sources, the first being empty (i.e., just libc). this allows us doing away with the "libdl" feature, and using just the "dlopen" one. subsequently, replace all LIBS+=$$QMAKE_LIBS_DYNLOAD with QMAKE_USE+=libdl. the definitions of QMAKE_LIBS_DYNLOAD remain in the qmakespecs for backwards compat only. n.b.: the only specs where it is not empty or "-ldl" (i.e., what we support now) are the hpux ones, where the library is called 'dld'. technically, the "library" feature should depend on '!unix || dlopen', but that's for a later patch. Change-Id: Ib8546affc4b7bc757f1a76729573ddd00e152176 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Windows QPA: Better recover from removed screens when fullscreenJocelyn Turcotte2017-03-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::handleResized would call isFullScreen_sys which checks if the window's screen geometry matches the one of the window. When switching back from fullscreen, Windows will have set the geometry to fill the next window, but we don't switch QScreen until later in that function, inside handleGeometryChange. This would result in our window to take the whole screen geometry, but the FullScreen state wouldn't be transferred to the new screen. Fix the issue by using screenForGeometry and check if we are fullscreen on any screen. Also make sure that we check the validity of m_savedFrameGeometry when restoring after a screen remove, since we would previously restore to an area not covered by any screen anymore. Change-Id: I43bc02738007918e9a26c1d27a699c51d3365034 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | xcb: stringify enums for tablet qt.qpa.input.events qCDebugShawn Rutledge2017-03-031-4/+18
| | | | | | | | | | | | | | | | It's a bit easier to read, not having to look up TabletDevice and PointerType enum values manually. Change-Id: I53353be4dcea3e2cb875f04250502ffe802fc971 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Make "finger touch" not be a tabletAlbert Astals Cid2017-03-031-0/+2
| | | | | | | | | | | | | | Otherwise QTouchDevices::devices() doesn't return the touchscreen on my Thinkpad Yoga 460 Change-Id: Ibb829df95f92152a77c512e4325522825901074e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix build with -no-openglPaul Olav Tvete2017-03-035-8/+17
| | | | | | | | | | | | Change-Id: I6fb61944ef88e328a94ea6b7ab42db271828a602 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | BSD plugins: Replace LGPL21 with LGPL license headerKai Koehne2017-03-037-96/+138
| | | | | | | | | | | | | | Also use canonical contact url. Change-Id: I27cee9135228dabcf1ece5dcf15db18a2aa536f9 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | GTK3 plugin: Replace LGPL21 with LGPL license headerKai Koehne2017-03-032-29/+41
| | | | | | | | | | | | | | Also use canonical contact url. Change-Id: I6e925378ef4e82bdc739d23186d2dd6f23370d7a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | winrt: Fix potential warningMaurice Kalinowski2017-03-031-1/+1
| | | | | | | | | | | | | | | | fix warning about non-portable-includepath due to case insensitivity on windows file system. Change-Id: Ib92db836910c2b9d06a18c841e7c6f0c2e9abab4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | winrt: Fix compiler warningMaurice Kalinowski2017-03-031-0/+2
| | | | | | | | | | | | | | The drag event handler classes should have virtual destructors. Change-Id: Ia011856eec37ed303649a1eda036c52f5fa9f8e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Make VNC a proper featurePaul Olav Tvete2017-03-011-1/+1
| | | | | | | | | | Change-Id: Iffae3f4d77f46bbf7ac38e7c9bc916f060606dd9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix build with -no-feature-cursorPaul Olav Tvete2017-03-015-9/+19
| | | | | | | | | | Change-Id: I971dbe7827adf0cf06337348a0d011632c364725 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix build with -no-feature-tableteventPaul Olav Tvete2017-03-011-1/+3
| | | | | | | | | | Change-Id: I5f16db38a3a54acaa76f764b9d4d7167640587c9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Windows QPA: Replace LGP21 with LGPL license headerKai Koehne2017-02-281-14/+20
| | | | | | | | | | | | | | Also use canonical contact url. Change-Id: I58c7f5309883fa775d1bf7b56692e4c237a3f5a4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Integrity plugin: Replace LGPL21 with LGPL license headerKai Koehne2017-02-287-98/+140
| | | | | | | | | | | | | | | | Also use canonical contact url. Change-Id: I7faf9b329f4dd2c2a422d02e171bc2d39c359ed3 Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | bsdfb plugin: Replace LGPL21 with LGPL license headerKai Koehne2017-02-285-70/+100
| | | | | | | | | | | | | | Also use canonical contact url. Change-Id: Iaf22c48d0a548efaccd816132e8730cbb6e0bb5d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | IOS: Replace LGPL21 with LGPL license headerKai Koehne2017-02-286-84/+120
| | | | | | | | | | | | | | Also use canonical contact url. Change-Id: Id1d8328e6cc9aab82a30e0ee3a971e6935341b42 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | xcb: correct conversion of AbsX/AbsY to tablet width and heightShawn Rutledge2017-02-271-2/+2
| | | | | | | | | | | | | | | | This was a mistake in cb37ab82982569ef316d4948e0f13a9bfa6b3f55 Change-Id: I5897ceb34ab4aa1655efd20697d0e761cf7796b1 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-246-10/+16
|\| | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| * Android: Fix OpenGL shader compilation on updated emulatorEskil Abrahamsen Blomfeldt2017-02-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 0ae4b948515af904dba397448839056d9b7965af, we added a work-around specifically for the Android emulator, causing it to override the precision qualifiers in shader code, since the emulator would send the shader code directly to the host OpenGL driver and thus there was no guarantee that the qualifiers would be supported. Since then, the original issue with the emulator has been fixed, so now Qt applications are failing because of the work-around. [ChangeLog][Android] Removed old work-around which was causing OpenGL shader compilation to fail on updated Android emulators. Task-number: QTBUG-44697 Change-Id: I0da879b3a8fbe7cb2d0969cdf45664d0b3499891 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * fix VNC platform plugin build on big-endian machinesShawn Rutledge2017-02-173-5/+10
| | | | | | | | | | | | | | Task-number: QTBUG-58734 Change-Id: I3e44ee4be5003acaba2f1b8ed2658a3ff1bd700e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
| * Respect XDG_CONFIG_HOME when getting ibus socket locationFlorian Bruhin2017-02-171-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-58687 Change-Id: I97ea8b7d7caf922227a92348fb914aead1ecd312 Reviewed-by: Tinu Weber Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * macOS: use active window device pixel ratio for drag pixmapOleg Yadrov2017-02-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QCocoaDrag::dragPixmap, it treats QDrag::source as a QWindow, but it is not - it's just a generic QObject* of some kind (which QQuickDrag sets to the originating QQuickItem, and the widgets stack sets to a QWidget). This failure means that dpr stayed at 1.0. Unfortunately it’s not possible to receive a pointer on QWindow directly from QQuickItem because QtWidgets and QtQuick do not share the sources, but we can use the same dpr as current focused window has because drag can only start from active window - press on a window which is not focused should activate it first. Task-number: QTBUG-57942 Change-Id: Id358c181d03d519188caaa83fb4226033b8ed1ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | handle TabletMove events during stylus hoverShawn Rutledge2017-02-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reason for this is to get feedback about the stylus orientation (angles and rotation) before the user presses it. For example an application might provide an image of the brush which rotates along with the stylus. As with mouse events, applications can distinguish hovering by the fact that no buttons are pressed. On the xcb platform we need to stop blocking the hover events, and in QWidgetWindow we need to send the event to the widget being hovered, while keeping the existing "grab" behavior: after pressing the stylus (or any button on the stylus or on the tablet), keep sending the events to the same widget until release. Task-number: QTBUG-26116 Change-Id: Iaed8b3b94961290dbb29b5fd2ea892fed7221685 Reviewed-by: Dmitry Kazakov <dimula73@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | macOS: Make sure NSResizableWindowMask is set when toggling fullscreenTor Arne Vestbø2017-02-222-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | Instead of setting the mask in toggleFullScreen(), which is only hit when going to fullscreen via our own API, we do it in the window notification callbacks, which also includes going to full screen via the native macOS title bar buttons. This allows making customized windows without Qt::WindowMaximizeButtonHint full screen with the full geometry of the screen. Change-Id: I63c3e4582ea7c4fe8c0008265793c5f656b830b2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QWindow: Remove "_q_foreignWinId" dynamic propertyTor Arne Vestbø2017-02-2214-38/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform plugins reading this out of the QWindow was a layering violation, and propagates the notion that a window can shape shift into representing a new native handle, while none of the platform plugins support this. A foreign QWindow is created via the factory function fromWinId(), at which point we can pass the WId all the way to the platform plugin as function arguments, where the platform will create a corresponding platform-window. The platform window can then answer the question of whether or not it's representing a foreign window, which determines a few behavioral changes here and there, as well as supplying the native window handle back for QWindow::winId(); [ChangeLog][QtGui][QWindow] The "_q_foreignWinId" dynamic property is no longer set nor read. [ChangeLog][QtGui][QPA] The function createForeignWindow() has been added to QPlatormIntegration and is now responsible for creating foreign windows. The function isForeignWindow() in QPlatformWindow has been added, and platforms should implement this to return true for windows created by createForeignWindow(). Task-number: QTBUG-58383 Change-Id: If84142f95172f62b9377eb5d2a4d792cad36010b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | macOS: Retain foreign windowsTor Arne Vestbø2017-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Regression after 89842b97d74d1, where the retain was part of setView. We release m_view in the destructor, regardless of how the view was acquired, and the non-foreign window retains by being the one creating the view. Task-number: QTBUG-59001 Change-Id: I6d9621a63ea6ec2cee008986b0ab72ff61110ad7 Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Make better use of new QStringList::join(QLatin1String) overloadMarc Mutz2017-02-192-3/+3
| | | | | | | | | | | | | | | | It was added in Qt 5.8. Change-Id: I7194fbfaef9219110604f3b03a893a658c996c06 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | qeglfskmsegldevicescreen.cpp: add errno.h includeDavid Faure2017-02-181-0/+1
| | | | | | | | | | | | | | | | | | Compilation failed with clang 3.9.1: qeglfskmsegldevicescreen.cpp:104:27: error: use of undeclared identifier 'errno' qErrnoWarning(errno, "drmModeSetCrtc failed"); Change-Id: I7cf08494359092b9cdac10bb013ac56c3ddf5597 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | xcb: support graphics tablets with the "uc-logic" nameDmitry Kazakov2017-02-171-0/+3
| | | | | | | | | | | | | | | | | | | | Similar to support for the other Genius tablets. https://bugs.kde.org/show_bug.cgi?id=359642 Task-number: QTBUG-52626 Change-Id: I3e2033d547d8bab4b6fb93be3a172bdce4fc5666 Reviewed-by: Dmitry Kazakov <dimula73@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-02-172-2/+4
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-162-2/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
| | * xcb: Allow to disable XInput 2 support by setting QT_XCB_NO_XI2 env varAlexander Volkov2017-02-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of XInput 2 may result in regressions. For example we call XISelectEvents for each window every time a device plugs/unplugs. It causes significant delays when there are many native windows. Change-Id: I60b799bb667d0e4bca1f9c52cdaa07b04bcc749f Task-number: QTBUG-57013 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * Windows QPA: Fix compilation with QT_NO_OPENGLOlivier Goffart2017-02-141-1/+2
| | | | | | | | | | | | | | | | | | | | | Compilation error introduced in 7780ee9e5f20f80ab9e053058d0b6d92586cf876 Change-Id: Ia770ca207cdd25bb15c74d681ece391a844791a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for full ↵v5.9.0-alpha1Friedemann Kleint2017-02-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update only It was introduced by 071914232189735ae6475d44d07f11f90b4729a1 (macOS QML fix) for apparently historical reasons and has been found to cause various problems: - Flicker when using QGLWidget in a QSplitter - (obscure) crashes due to flushing out input events in setVisible(). Task-number: QTBUG-38327 Task-number: QTBUG-39842 Change-Id: I18081da5f4645271774a51f1d6a88e778adbd6ac Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | macOS: Move NSWindow creation properties into createNSWindow()Tor Arne Vestbø2017-02-161-56/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the block in recreateWindowIfNeeded() that calls createNSWindow() to focus on how to (re)parent windows/views, while createNSWindow() takes care of how to set up the window. Dynamic properties that may change later on are handled in e.g. setWindowFlags(). Change-Id: Ice0e44d004bd2608b2b54e6dde0f404a1e07dc10 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Use static initialization for QBasicAtomicsMarc Mutz2017-02-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0. Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Resize the window when the screen's dpi changesOlivier Goffart2017-02-164-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | That's what the MSDN documentation say one should do in the handler for WM_DPICHANGED [ChangeLog][QtGui][Windows] Windows are now automatically resized when they are moved on a screen to adapt to the new pixel ratio. Task-number: QTBUG-55510 Task-number: QTBUG-48242 Change-Id: I7688f12165f76585d75686e2e94b0fc562627be2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | macOS: Rewrite window state handlingTor Arne Vestbø2017-02-166-110/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on specific notifications to change the window state we now evaluate the state based on the current window state. This allows us to get rid of windowShouldZoom in the window delegate, making window state handling work for foreign windows as well, and also allows us to re-evaluate the state in more places, such as when moving a window, which may bring it out of maximized state. The full screen state is tracked by a helper category that doesn't just rely on the styleFlag, but also on the full screen notifications. This is needed as macOS will complain if you try to go in or out of fullscreen while a transition is in effect. The differentiation between performFoo: and foo: has been removed, as the latter works in both cases and doesn't rely on the button being visible/enabled. These changes fixes many observed quirks in the window state handling that also resulted in making it hard to write tests that relied on the fullscreen/maximized operations always working. Change-Id: I0538c42d9223a56f20ec9156f4939288e0750552 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Make some atomic counters zero-basedMarc Mutz2017-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | macOS: Don't hide NSWindowZoomButton when window can go into fullscreenTor Arne Vestbø2017-02-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The button in the title bar is used both for going into full screen and maximizing (zooming) the window. We can't hide/disable it unless both Qt::WindowFullscreenButtonHint and Qt::WindowMaximizeButtonHint are off. This means that when Qt::WindowMaximizeButtonHint is off, it's still going to be possible to Option-click the button to maximize the window, but this is less of a concern than hiding the full screen button when Qt::WindowFullscreenButtonHint is set. Change-Id: I70dbe27b3197fe22c1781277f8bf9a818d71d04d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>