summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsbackingstore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.Friedemann Kleint2016-02-191-2/+2
| | | | | | | | | | | | | | | | Code except font, accessibility and file qwindowswindow.cpp. Task-number: QTBUG-50804 Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-181-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * Do not change depth for the backingstore's underlying imageLaszlo Agocs2016-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The depth cannot change. This means that RGB16 cannot be upgraded to 8565 for example as that would be a 24 bit format whereas the backingstores and the underlying platform may expect a 16 bit format. Task-number: QTBUG-50869 Change-Id: I648b39287d43a80fae8097a33bbf3b8bbdcb8816 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Windows QPA: Improve handling of windows of type Qt::ForeignWindow.Friedemann Kleint2016-01-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract a base class QWindowsBaseWindow from QWindowsWindow that provides _sys() getters for geometry and margin calculation and implements QPlatformWindow::geometry()/ frameMargins() to be calculated from the HWND. Implement a QWindowsDesktopWindow class directly inheriting QWindowsBaseWindow which does not allow any manipulation. Add a thin QWindowsForeignWindow class that wraps a foreign window id and always returns correct geometry/margin information when queried. Simple reparenting and manipulation of geometry for child windows is also implemented, allowing for embedding foreign windows into Qt. When calling other setters on it, the unimplemented warnings of QPlatformWindow will trigger. Remove the special casing for foreign/desktop window from QWindowsWindow. The existing mechanism to cache the geometry/margin values in QWindowsWindow remains as is. Rename the existing QWindowsWindow::baseWindowOf() and add checks there. Task-number: QTBUG-50206 Task-number: QTBUG-41186 Change-Id: Ib57cb87e3981312d32920fe3e49f0b1c4ad516a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-4/+14
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| * Promote backingstore image format to alphaLaszlo Agocs2016-01-171-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Like xcb does since 1bcfc3de7586ddb9f5d1b778b97b26ae3dc9584d. For TranslucentBackground (ARGB32_Premultiplied) there is no change in practice. For RGB32 we will promote to ARGB32_Premultiplied but everything should behave like before, except that we do not rely on undefined behavior anymore when QOpenGL/QuickWidget is in use. For RGB16 this will enable QOpenGL/QuickWidget since there the hole punching mechanism needs an alpha channel always. Change-Id: Id04ea548cee245ec91642f1358a5e501b62ff64c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QWindowsBackingStore::flush(): Add warning for UpdateLayeredWindowIndirect() ↵Friedemann Kleint2015-12-121-1/+6
| | | | | | | | failures. Task-number: QTBUG-49785 Change-Id: I881e6d294ae6b23e280e727ee1fc48ee6562f2fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Fix calculation of frame offset for layered windows.Friedemann Kleint2015-11-201-1/+2
| | | | | | | | | Pass 0 window to High DPI scaling function to prevent it from trying to find a screen and applying a screen offset. Task-number: QTBUG-49516 Change-Id: Ib3e1919985f2c6df1dd8369f6e28b3ee1fdb7afe Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Highdpi changes for WindowsFriedemann Kleint2015-07-301-2/+3
| | | | | | | | | | Adapt the Windows plugin to work with the new cross-platform high-DPI scaling. Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I108d319255925a290b75611e95ef006d4aaf7ace Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Revert "Add devicePixelRatio support to the Windows QPA plugin."Friedemann Kleint2015-07-291-21/+18
| | | | | | | | | This change reverts c47b04696a9d1dab04c4a59ed9ce4c28aa00fe98 . Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I180dcac3a65a33498b90a71bbcad5e45a12af77c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add devicePixelRatio support to the Windows QPA plugin.Friedemann Kleint2014-08-251-17/+21
| | | | | | | | | | | This adds support for the environment variable QT_DEVICE_PIXEL_RATIO for the Windows platform plugin. Task-number: QTBUG-38993 Task-number: QTBUG-38858 Change-Id: I6831eb6d3a09a80be7bbef46395e91531b61cc50 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Windows: Use Format_ARGB32_Premultiplied for backing store with alpha.Friedemann Kleint2014-05-061-3/+2
| | | | | | | | | Following the logic in Qt 4's QRasterWindowSurface::setGeometry(). Task-number: QTBUG-30302 Change-Id: Ica571cfd5098e3d9faedefaff0880acfb2209958 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Support QQuickWidget on Windows.Friedemann Kleint2014-03-041-0/+13
| | | | | | | Task-number: QTBUG-36887 Change-Id: Ifb03804e21fd82d7eae2942b9e8ca83f1bdb776c Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Windows: Remove unused function QWindowsBackingStore::rasterWindow().Friedemann Kleint2014-01-241-10/+2
| | | | | | | | | | It was only used to access the QWindow which can be retrieved using QPlatformBackingStore::window(), potentially causing a crash when QWindowsBackingStore::resize() was called before the window is shown. Change-Id: I7c1bfce0f2c371d5d8847fd15fd1dc760b769a8f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Port Windows QPA plugin to new logger API.Friedemann Kleint2014-01-221-16/+12
| | | | | | | | | | | | | | | | 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: Silence warnings about BitBlt() failing.Friedemann Kleint2014-01-151-2/+5
| | | | | | | | | | | | After showing the lock screen, spurious warnings about BitBlt() failing occur with last error set to ERROR_SUCCESS or ERROR_INVALID_HANDLE. Task-number: QTBUG-35926 Task-number: QTBUG-29716 Change-Id: I3e899cdf1ae60e76d13b81caec43716ad7c9725d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix the ignored Qt::WA_StaticContents on WindowsChris Colbert2013-11-251-1/+17
| | | | | | | | | | | | | | | | | | | This restores the ability from the Qt 4.x series to honor the static contents region in the backbuffer when resizing a widget. The fix only applies when running under Windows. Task-number: QTBUG-34799 [ChangeLog][QtWidgets][Windows] Update QWidgetBackingStore and QWindowsBackingStore to support Qt::WA_StaticContents QWidgetBackingStore::staticContents() was updated for windows to *not* unconditionally return false. It now returns true if it has a non-empty static widgets list. QWindowsBackingStore::resize(...) was updated to honor the provided static contents region. It now copies the static region into the new backbuffer in a manner similar to what was done in Qt4. The difference is that this version accounts for the possibility of the new buffer having a smaller region than the old buffer. In Qt4 the ::prepareBuffer method was only called when the buffer was resized larger. Change-Id: I135ff8fb16f52759089f1e7353426303c4504db3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Windows: Fix window opacity for non-translucent windows.Friedemann Kleint2013-09-121-1/+3
| | | | | | | | | Use the UpdateLayeredWindow() functions only for windows with alpha. Task-number: QTBUG-33025 Change-Id: I64b0c28ee0997cd3d09dc76babe105ed474c6835 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix format for alpha drawing.Friedemann Kleint2013-04-181-1/+1
| | | | | | | Task-number: QTBUG-28531 Change-Id: Ie97953950cad26776724848adc5751c861903cf7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix broken fading of menus.Friedemann Kleint2013-02-081-2/+2
| | | | | | | | | | Breakage introduced by b3820b12fbded1f173837eee7f7559783e92b46b Set layered in backing store for frameless windows as was before. Task-number: QTBUG-29010 Task-number: QTBUG-28531 Change-Id: I13f8f0d58d71b6612430c7048056f672e23b8095 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Fix setting of layered windows.Friedemann Kleint2013-02-061-5/+1
| | | | | | | | | | | | | The setting/clearing of WS_EX_LAYERED in the backing store interfered with the setting/clearing in setWindowOpacity when combining translucent and non-opaque windows. Introduce QWindowsWindow::setWindowLayered to handle it consistently. Task-number: QTBUG-29010 Task-number: QTBUG-28531 Change-Id: Ib6e2740aae417bdf7b3db9ef7deb646be98df1d6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clear backingstore for windows with alpha channel.Friedemann Kleint2013-01-111-3/+13
| | | | | | | | | Fixes painting artifacts in translucent windows. Task-number: QTBUG-28531 Change-Id: I00a7a86f88a40d356fa3e37bd497a288b2118469 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Windows: Add fallback for UpdateLayeredWindowIndirectJonathan Liu2013-01-041-4/+9
| | | | | | | | | | The UpdateLayeredWindowIndirect function is only available on Windows Vista and later. If UpdateLayeredWindowIndirect is not available (e.g. on Windows XP), use UpdateLayeredWindow instead. Change-Id: I8af23c051560f7e54eda390dae7553543c00a94b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix Windows platform plugin narrowing conversion compile errorsJonathan Liu2012-09-051-1/+1
| | | | | | | | Implicit conversions from int to BYTE (unsigned char) result in compile errors when compiling with the GCC -std=c++0x option. Change-Id: Iaf8190426207bf15ab4b337300510596d70659ed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Disable TranslucentBackground for WinCE to fix Windows QPA plugin build.Janne Anttila2012-06-191-0/+4
| | | | | | | | | | WinCE and WEC7 does not support layered Windows APIs: http://msdn.microsoft.com/en-us/library/hh300132.aspx For now - fallback to default window BitBlt always in WinCE. Change-Id: I6f99d198dec9e90fb4a968882271b466638009d6 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* implement Qt::TranslucentBackground for WindowsJoerg Bornemann2012-06-091-9/+30
| | | | | | | | | Adapted the Qt 4.8 implementation of translucent widgets in the Windows platform plugin. This is only working for non-OpenGL top level Windows. Change-Id: Ic4c1c52d33b380f530f6a07e96c0c154a0571415 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows QPA plugin: Add \internal to class documentation.Friedemann Kleint2012-05-291-0/+1
| | | | | | | | Prevent the classes from appearing in the Qt documentation. Change-Id: I62abff0c57effdf16629f9d5a0dc384ea2c43d5a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QWindowsBackingStore: Implement scroll.Friedemann Kleint2012-05-211-0/+14
| | | | | | | | | | Similar to XCB. Task-number: QTBUG-24299 Task-number: QTBUG-24296 (partially fixed) Change-Id: I4c9d813d9645f957f2caad0c4e395ce0d3d222cc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QPA plugins]Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I4aef078ea87ecd3699de107d1e9352d9fb6d6e39 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* QWindowsBackingStore: Flush to correct window.Friedemann Kleint2012-04-271-1/+2
| | | | | | | | Task-number: QTBUG-25435 Change-Id: I13f57a328a7ac3402fe0def9d724f7e700016c80 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix compilation with QT_NO_DEBUG_OUTPUT definedAndy Shaw2012-04-201-0/+2
| | | | | Change-Id: If96e93c08240e0f626f8e465993b2c38b2cad832 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix email address in license headers.Jason McDonald2011-09-151-1/+1
| | | | | | | Change-Id: I5abf378f91a3a8f453058f36254f04258147cc15 Reviewed-on: http://codereview.qt-project.org/4851 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Windows to the Lighthouse.Friedemann Kleint2011-08-181-0/+143
Add an initial Lighthouse plugin for the Windows operating system. Change-Id: I6934562266e1aa0ac270bf6107df05a9e56ef82c Reviewed-on: http://codereview.qt.nokia.com/3107 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>