summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-2/+23
|\ | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Windows QPA: Remove dependency on swprintf_s() pulled in via ↵Friedemann Kleint2014-05-191-1/+22
| | | | | | | | | | | | | | | | _com_error::ErrorMessage(). Task-number: QTBUG-35617 Change-Id: I0ad926ac564612ebd0eb38f16b3e69cbcd48e62f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Fix potential null pointer accessFrederik Gladhorn2014-05-191-1/+1
| | | | | | | | | | Change-Id: I7516ce88b38609ab9851419566141ba93a59aed3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Windows: Use new clipboard API for listening to changes.Friedemann Kleint2014-05-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The currently used clipboard chain API has various problems with non- responsive applications and requires checks for hung/debugged applications when sending on notifications. The new clipboard format listener API available from Windows Vista onwards requires less code and does not have these problems, however the change notifications now arrive asynchronously. Change the tst_qclipboard to be able to deal with asynchronous change notifications. Task-number: QTBUG-38670 Task-number: QTBUG-33492 Change-Id: I3c49e346a34310431c20f3051d12eaabf330a3ad Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-061-21/+68
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Windows: Reject focus-in caused by reparenting Windows.Friedemann Kleint2014-04-251-0/+9
| | | | | | | | | | | | | | | | | | Calling WinAPI SetParent() causes the window to be activated, which is not desired for native child widgets. Task-number: QTBUG-32867 Change-Id: Idf61931bc425a043a4b7a98eec9ae122e234dc37 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Improve COM error handling in the Windows platform plugin.Friedemann Kleint2014-04-251-19/+51
| | | | | | | | | | | | | | | | Add error strings, print warning if OleInitialize() fails. Task-number: QTBUG-38398 Change-Id: I37f6b7003fd1cf524ce69d6843891943402b27a1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Fix copy-paste error.Richard J. Moore2014-04-181-1/+1
| | | | | | | | | | | | | | | | | | Fix an error identified by static analysis from http://www.viva64.com/en/b/0251/ Change-Id: I3b69f8eb8c9e10772d5ca2afad75582e8a54beb7 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * XCB: fix that modal dialogs can go behind other process windowsJorgen Lind2014-04-161-1/+7
| | | | | | | | | | | | | | Task-number: QTBUG-35302 Change-Id: I1ad7a66e530710d5338a15057254360dae676451 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Windows: Start using High DPI API available from Windows 8.1 onwards.Friedemann Kleint2014-04-301-3/+38
| | | | | | | | | | | | | | | | | | | | Dynamically load shcore.dll, use SetProcessDpiAwareness() instead of SetProcessDPIAware() when available. Add command line parameter to control level. Task-number: QTBUG-37347 Change-Id: I1259b0943b41e50066e7e3870ed3136afd8f18fe Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-131-1/+3
|\| | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899
| * Windows: Fix return value of WM_QUERYENDSESSION for bogus messages.Friedemann Kleint2014-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | LRESULT should be non-zero if the application can quit, and it is always handled. Improves 97d8e3b2007abf7b14b4ccbfbbc4abdeef712bcf . Task-number: QTBUG-35986 Change-Id: I0ad95bc20a5d9e2a52c76bdcdfa986595f6a08d8 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Enable menuless dialogs on Windows.Friedemann Kleint2014-02-281-1/+9
|/ | | | | | | | | | | | | | | | Handle the flags combination Qt::Dialog && !Qt::WindowSystemMenuHint such that it results in exStyle = WS_EX_DLGMODALFRAME and style = WS_POPUP | WS_BORDER | WS_SYSMENU and a window class without icon. Do not set !Qt::WindowSystemMenuHint in QWidgetPrivate::adjustFlags() for dialogs on Windows. [ChangeLog][QtWidgets][QDialog][Windows] Dialogs can now be menuless. Task-number: QTBUG-2027 Change-Id: Ieb86985e8a5291d826c103fe478ecde43971f08e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Add platform plugin parameter for tablet absolute range.Friedemann Kleint2014-02-271-0/+10
| | | | | | | | | | | | Make the range for detecting relative (mouse mode) configureable using -platform windows:tabletabsoluterange=50 Task-number: QTBUG-36937 Change-Id: I44f928e53cb41b246c44554ec7f71bfbdf03c147 Reviewed-by: Arthur Krebsbach <Arthur.Krebsbach@Wacom.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Windows: Destroy tablet support before unregistering window classes.Friedemann Kleint2014-02-131-2/+7
| | | | | | | | | | | Silences warnings in tests that instantiate QGuiApplication multiple times. QSYSTEM: tst_QGuiApplication::removePostedEvents() QApplication::regClass: Registering window class 'TabletDummyWindow' failed. (Class already exists.) QSYSTEM: tst_QGuiApplication::removePostedEvents() UnregisterClass failed for 'TabletDummyWindow' (Class still has open windows.) Change-Id: I6af2d38a2debd35f4dc0d48c09244dff022bd6b8 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Windows: Fix return value of WM_QUERYENDSESSION.Friedemann Kleint2014-02-101-1/+2
| | | | | | | | | | LRESULT should be non-zero if the application can quit, and it is always handled. Task-number: QTBUG-35986 Change-Id: Ic8b0ecc731d3efaf94e2a62491918d379fe59f5c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Reconstruct MSG-structure properly.Friedemann Kleint2014-01-241-2/+14
| | | | | | | | | | | The MSG structure is supposed to contain screen coordinates of the mouse position. Use GET_X/Y_LPARAM for mouse events and transform for client coordinates. Use GetCursorPos() for other events. Task-number: QTBUG-36337 Change-Id: I3ad4de20e1a460ee58f22645a4339a2444d129ed Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Observe Qt::NoDropShadowWindowHint.Friedemann Kleint2014-01-221-1/+1
| | | | | | | Task-number: QTBUG-36230 Change-Id: I8a9956c4b0ccd98b92f98107ea6dbbb08b296d09 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Port Windows QPA plugin to new logger API.Friedemann Kleint2014-01-221-33/+26
| | | | | | | | | | | | | | | | Introduce logging categories and change most debug statements to qCDebug(). Retrieve the filter rules from the environment variable QT_QPA_VERBOSE (should be removed once the logging framework offers a more convenient way of configuring). Replace the old per-category variables controlling verboseness of the output by a single variable which can be set on the command line. Change-Id: Iae55ecdb0e150efd165b7d3e90b371f72853f194 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Remove rarely used integration/theming logging categories.Friedemann Kleint2014-01-151-9/+2
| | | | | | | | Preparing the introduction of the categorized logging system for the plugin. Change-Id: I2b180d88cf508559f495d39d4e1d36b8f3da7051 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Respect the WindowDoesNotAcceptFocus flagAndy Shaw2013-12-051-0/+10
| | | | | | | | | | When the window is requested to be made active then it should check if the window accepts focus or not. If it does not then it should ensure it informs the underlying system that it does not accept the activate event. Change-Id: I3e6533be792d8bdbb2bfcdf3b9c1a93e2c67c75a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add a warning message when a WM_DESTROY not triggered by Qt is received.Friedemann Kleint2013-11-071-2/+8
| | | | | | | Task-number: QTBUG-34503 Change-Id: I7a1e06b34deaf8e595f4986114701480bdcf219c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Clean up QWindowsSessionManager.Friedemann Kleint2013-11-051-4/+4
| | | | | | | Fix spelling error in method name and inline simple functions. Change-Id: I7f2a67fb1951b58874b09002ee57e15e75561727 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Fix virtual key mapping on MS WindowsJuan Luis Boya García2013-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In order to map MS Windows virtual keys to Qt keys without messing with dead keys now I use the built-in keyMap structure of QWindowsKeyMapper and assert every cell in the keymap is properly updated. In order to guarantee this even when the user changes the keyboard layout, WndProc now manages the WM_INPUTLANGCHANGE message, which is handled by QWindowsKeyMapper, resetting the layout structure. I don't fully understand yet some things about QWindowsKeyMapper, i.e. how QWindowsKeyMapper::updatePossibleKeyCodes workarounds the dead key issue with ToAscii; but it seems to work fine in all the tests I've done. Any further testing is highly appreciated, though. [ChangeLog][[QtGui][Platform Specific Changes][Windows] Fixed virtual key mapping on Windows. Task-number: QTBUG-33409 Task-number: QTBUG-8764 Task-number: QTBUG-10032 Change-Id: I4f7709a90906b03f4504deea1ff5c361e9f94b3f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix compilation with older MinGW headersKai Koehne2013-10-121-1/+1
| | | | | | | | | | Headers from mingw.org (4.7.2) declares _flushall only if __STRICT_ANSI__ is not defined ... Anyhow, we can as well use fflush(), which is in the official standard. Change-Id: Ic2b4d2ac724280f1304221be1fceab067af0c1f8 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Port of Qt 4's Windows session managementSamuel Gaist2013-09-211-1/+69
| | | | | | | | | | This patch aims to implement the session management for Windows. Based on the Qt 4 QApplication windows specific code Task-number: QTBUG-28228 Task-number: QTBUG-33032 Change-Id: I7059298ad9661aebd51e77a03f55a7a04f461479 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Windows: Added support for large icons to QFileIconProvider.Friedemann Kleint2013-09-061-0/+2
| | | | | | | | | | Added code using image lists to windows theme. Initial-patch-by: Max Desyatov <max.desyatov@gmail.com> Task-number: QTBUG-4970 Change-Id: I6e82f4edec60e456d0b1759bb1771955edb94491 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Enable DWM transparency for OpenGL windows under WindowsGiuseppe D'Angelo2013-08-281-0/+3
| | | | | | | | | | | | | | | | | | Starting with Windows Vista, we can control the compositing window manager using the DWM APIs. This allows us to make truly transparent OpenGL windows. We also have to detect and listen if compositing is enabled, otherwise enabling transparency will cause glitches all over the place. This (partially) fixes Task-number: QTBUG-28214 Change-Id: I0fe1ec7adec8181b788c32de03c59142731d9e7f Done-with: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-211-1/+3
|\ | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| * Windows: Add hit test handling for non-client areas.Friedemann Kleint2013-08-191-1/+3
| | | | | | | | | | | | | | | | Suppress resize cursor for fixed size windows. Task-number: QTBUG-32663 Change-Id: I9579bb13d494fe21e5db7b75d01a3cf1b693c7f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-1/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Merge branch 'release' into stableSergio Ahumada2013-08-091-0/+5
| |\ | | | | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| | * Windows: Clear window under mouse in destruction of platform window.Friedemann Kleint2013-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32042 Change-Id: I8aa5df84b7ca6deb47e0c3eff9a6a7d2c4793553 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | Windows: Mark window margins as dirty when the theme changes.Friedemann Kleint2013-07-241-1/+6
| |/ | | | | | | | | | | | | Task-number: QTBUG-31523 Change-Id: Ibd8ed4e3fc5b6d1723f94dc32b3bf86b74e71020 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Implement support for global whatsthis on WindowsSimon Hausmann2013-08-131-0/+6
| | | | | | | | | | | | | | Task-Number: QTBUG-32835 Change-Id: Ifee10d815ce0037c96eda574ab9e1af67ff6bd78 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Add WACOM tablet support for Windows.Friedemann Kleint2013-07-041-5/+29
|/ | | | | | | | Task-number: QTBUG-30008 Change-Id: I3327baecae7c5d1411bcd125411097f36460cde5 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix windows expose logicGunnar Sletta2013-04-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Make sure the value of QWindowsWindow::isExposed is in sync with regions we expose. This provoked a couple of existing issues in the qwidget test. setWindowGeometry tested that windows with invalid sizes got exposed on screen. They didn't, but because the plugin sent bogus events, these used to pass. Same with windowMoveResize. The expect fails are also rather bogus. Showing invalid-size widgets could be considered undefined behavior. The Window manager could resize it, choose to not show it at all, etc, but they now pass on windows. resizeEvent has been broken since 5.0.0, but the test didn't spin the event loop so the second event didn't get delivered before the test completed. Task-number: QTBUG-30744 Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix Windows CE compilation.Friedemann Kleint2013-04-121-7/+4
| | | | | | | | | | | | Breakage introduced by 11e9f1368be986d0e128e8f7b2423d9cc7dd5436 . Simplify #ifdef-blocks. Task-number: QTBUG-30063 Change-Id: I0710915ff7b0ad5947935904c43ff9b621f638f2 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Windows: Dont use black as clear color on opengl windowsJens Bache-Wiig2013-04-101-4/+1
| | | | | | | | | | | Perhaps this made sense when all our open gl examples were black, but with components and I would assume the majority of use cases we should use the default window background color to fill exposed window background during a resize. Change-Id: Ia439a7c3919243efa6026e2e07bee62c25557df0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-04-031-4/+8
|\ | | | | | | Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
| * Windows: Fix reported screen metrics.Friedemann Kleint2013-03-261-4/+8
| | | | | | | | | | | | | | | | | | A call to SetProcessDPIAware() is required in some cases. Task-number: QTBUG-30063 Change-Id: Iba0203d76c8e7068bf9fd4581770c1aca76a4708 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Windows: Fix class name generation for Qt Quick Controls.Friedemann Kleint2013-03-181-42/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | New combinations of settings need to be handled (for example, GL + drop shadows for menus). Generate the class name depending on style settings. Introduce new dynamic property for drop shadows. Change-Id: I438f7bdd87f09d3c99076ebf825a12d862948ec1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * | Fix automatic hiding/restoring of transient children.Friedemann Kleint2013-02-281-2/+2
| |/ | | | | | | | | | | | | Task-number: QTBUG-28408 Change-Id: I31382c4edc213961dfb132af3bf5202e178e7a57 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-3/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Show default shortcut menu when user right click window's captionJian Liang2013-02-051-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | In windows platform, Qt5 will not show the system default shortcut menu when the user right click in the window's caption. This is a regression from Qt4. This patch will let DefWindowProc() to handle the message WM_CONTEXTMENU if the mouse pointer is in the non-client area of the window. Thus the default Windows shortcut menu will show up. Change-Id: I88638ad1d4f0e73b088204b83c3f7ec0fe2033f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix frame of Aero-Style wizards.Friedemann Kleint2013-01-091-7/+2
|/ | | | | | | | | | | | | | | | Add custom frames which are added to the system frame to the platform plugin. Make them settable when creating a platform window using dynamic properties and per window properties of the platform native interface. Use this in favor of the native event handling changing the frame in wizard_win.cpp since that caused the frame/backing store sizes of the QWindow to be wrong. Task-number: QTBUG-28099 Change-Id: Idd6416cf1b0eb629f56663088b0ce17162e1739d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix touch event handling for WindowsOliver Wolff2012-11-271-2/+4
| | | | | | | | | | | | | Filtering touch events depending on Qt::WA_AcceptTouchEvents is not trivial. I thought about doing so in QWidgetWindow::handleTouchEvent but the target widget (not window), which has to be checked, has to be obtained using the primary touch event's position etc. Thus that is not part of this commit and will be done in a followup. Change-Id: I876ee72acd7fdfbe46da61c6eb3c5891ea319cd8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>