summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Update transient parent in show().Friedemann Kleint2013-04-253-13/+39
| | | | | | | | | Similar to XCB. Task-number: QTBUG-30707 Change-Id: I6dd7aa370891a46aa5a2243528692180d8366486 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows native save file dialog: Do not append suffix afterwards.Friedemann Kleint2013-04-251-15/+39
| | | | | | | | | | | | | | | Instead, set the currently selected filter's suffix as default suffix of the dialog unless another default suffix has been set. This emulates the behavior of Qt 4 behavior which would set the selected name filter's suffix as default suffix in QFileDialog::getSaveFileName(). Task-number: QTBUG-30748 Change-Id: I111cd6190ddab8775a0fa72b94b3c728dd411c5e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix windows expose logicGunnar Sletta2013-04-253-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Windows: Position full screen windows on the correct screen.Friedemann Kleint2013-04-241-2/+16
| | | | | | | | | Find effective screen by searching the virtual sibling that contains the center as does QDesktopWidget::screenNumber(). Task-number: QTBUG-30724 Change-Id: I8441ab4f3e5ee8169613a82f150d1a4f1777b662 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Accessibility Windows: always check for negative child idsFrederik Gladhorn2013-04-222-26/+21
| | | | | | | | | | | Some screen readers will pass in child id's that are negative as response to notifications. We should always check for negative id's on incoming calls. Task-number: QTBUG-30792 Change-Id: Idaba3d1931d35ed068cfd9f20e70aa26da427616 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Implement QApplication::beep().Friedemann Kleint2013-04-191-0/+2
| | | | | | | | | | Invoke slot "beep" on QPlatformNativeInterface. Implement for Windows and X11. Task-number: QTBUG-30416 Change-Id: I2be651165b899e5147818a012001d354827bb090 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Implement alertion state for windows.Friedemann Kleint2013-04-192-1/+17
| | | | | | | | | | | | | | Add QWindow::alert() and QPlatformWindow::setAlertState(). Add logic to clear alertion state when the window becomes active. The platform plugins then only need to implement a setter and a cheap getter and need not handle activation. Prototypically implement X11 and Windows. Task-number: QTBUG-30416 Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Let platform plugin decide if accessibility is activeFrederik Gladhorn2013-04-191-0/+4
| | | | | Change-Id: I881a8ff3fedf3db73ee37046a4363c70960a92a6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@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>
* Calling wglMakeCurrent on an already current context gives 100% cpu loadGunnar Sletta2013-04-181-1/+9
| | | | | | | | | The problem occurs at least with nvidia cards when vsync is enabled in the control panel. Task-number: QTBUG-29686 Change-Id: I6fd2a3560a5baeeac7c3fe0440db85904c45026d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Do not send clipboard message to application under debugger.Friedemann Kleint2013-04-171-0/+20
| | | | | | | | | Fix Qt Creator hang when copying a stack trace from an application showing a runtime assert. Change-Id: I874bd48643ebce1a3551644dc850cb7cf5869522 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Fix compile with -directwrite.Friedemann Kleint2013-04-171-1/+1
| | | | | | | | Task-number: QTBUG-30643 Change-Id: I3a2a0e767a92bc2ff9d7d241dfad6771034e6ad4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QFontEngine: Fix cache_cost might be not initializedKonstantin Ritt2013-04-141-0/+1
| | | | | | Change-Id: I4cf4de5797e6623a71593e8f382496188e3abac8 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QWindowsFontEngineDirectWrite: Fix resources leakingKonstantin Ritt2013-04-141-0/+2
| | | | | | | | | | | fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus must be released with IDWriteFontFamily::Release(). Task-number: QTBUG-26861 Change-Id: I314153f97b8b59c9ba728220f93b493b13337039 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 localesKonstantin Ritt2013-04-112-2/+2
| | | | | | | | | | QFontEngine::FaceId::filename is intended to be local8Bit-encoded but QFreetypeFace::getFace() always treats it like UTF-8-encoded. Also replace explicit (to|from)Local8Bit and toLatin FaceId::filename conversions with QFile::(en|de)codeName, where appropriate. Change-Id: Ic7beabf0a160f2f02f1667bcb8e6067adaba1c16 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@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>
* Make QTextCursor accessibility boundary finder availableFrederik Gladhorn2013-04-081-3/+3
| | | | | | | | | This allows re-using the function in QtQuick. In addition TextBoundaryType is moved to QAccessible and QAccessible2 as namespace ceases to exist. Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Windows: Ignore mouse events generated by Windows.Friedemann Kleint2013-04-051-1/+5
| | | | | | | | Task-number: QTBUG-29946 Change-Id: Idef0e7cc8bc407377e60e4a9d67c3ba78b347b76 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Windows: Do not use native dialogs for non-modal dialogs.Friedemann Kleint2013-04-051-4/+2
| | | | | | | | | | | | Windows file dialogs are always modal (inheriting IModalWindow). As the QtQuick dialog plugin has a widget-based fallback now, there is no need to use native dialogs for the non-modal case. Task-number: QTBUG-30513 Change-Id: I8b62af86fde34e8c0cf5e917d2e62260e16c82fb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* The default behavior should be double buffered, not singlebufferedGunnar Sletta2013-04-051-3/+2
| | | | | | | | | Without this, it is not possible to do vsync drawing on NVidia GeForce 210 on Windows 7. Change-Id: I6064826eaa55266344393f50cdf5d17113350255 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-04-032-4/+12
|\ | | | | | | Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
| * Windows: Fix reported screen metrics.Friedemann Kleint2013-03-262-4/+12
| | | | | | | | | | | | | | | | | | 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>
* | Cache QAccessibleInterfaces.Frederik Gladhorn2013-04-026-247/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there already is a one-to-one relationship between QObject and QAccessibleInterface it makes little sense to create and destroy the interfaces on each call to queryAccessibleInterface. Add a cache and keep created interfaces around for the lifetime of the corresponding QObject. This changes the memory management rules: accessible interfaces must no longer be deleted. If you get an QAccessibleIntrface pointer that pointer will stay valid as long as the corresponding QObject is not deleted. This also re-enables accessibility for Mac. We limit the range of the IDs so that they are useable for Windows directly. That means we can get rid of the event cache there. This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Fix reporting writing systems for non-TrueType fontsKonstantin Ritt2013-04-012-68/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to EnumFontFamExProc docs: > The ENUMLOGFONTEX structure includes the localized name > of the script (character set). lfCharSet ENUMLOGFONT's member must be used instead of comparing these names to non-localized ones. Also, when the font supports more than a single charset, EnumFontFamExProc callback is called for it once per charset; thus, we shouldn't "unsupport" writing systems in a subsequent call. Task-number: QTBUG-30448 Change-Id: I58fcf32958490cf5a3e873db8335e71a39a9c518 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QFontConfigDatabase: fix fallbacksForFamily() for CJK languagesKonstantin Ritt2013-04-012-2/+2
| | | | | | | | | | | | | | | | | | | | For Han Unicode script, the language couldn't be determined algorithmically, the only way is guessing based on the user's locale. The is a regression introduced in 9b0fab6b62df98519ebfab117f14b9d3465d8c68 Change-Id: I84645885a825fdfb6c268edaf10185bf5e447eb5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Clean up touch window registration.Friedemann Kleint2013-03-252-7/+16
| | | | | | | | | | | | | | | | | | Stop processing for Qt::Desktop windows (which caused RegisterTouchWindow() to fail with access denied) and set a flag to cleanly unregister. Change-Id: I3d10c93ec92536d3ab1c0503f088c40b0c08a01f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Accessibility: Fix crash in windowHelperFrederik Gladhorn2013-03-233-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When accessing the parent, we cannot be sure that the parent interfaces are all valid. Invalid parents can happen during destruction. Another cause is unusual hierarchies, the QAbstractItemView::columnDelegate test triggers a situation where this used to crash. In addition to the actual problem, add checks for every parent() call. Change-Id: I70b2bf7bc3c02b0f33e22b81023fd24519adeba9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Do not update accessibility for invalid interfacesFrederik Gladhorn2013-03-231-1/+3
| | | | | | | | | | Change-Id: I8dc29ea51393406e529c76f25bf2f8cf426e26cf Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-211-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/qt_module_headers.prf mkspecs/features/qt_tool.prf src/angle/angle.pro src/tools/bootstrap/bootstrap.pro tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
| * Windows native file dialogs: Split suffix list correctly.Friedemann Kleint2013-03-201-1/+3
| | | | | | | | | | | | | | Task-number: QTBUG-30185 Change-Id: I9a3d16eafb5417d6720a702af662fb219487549d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Fix the font engines leakingKonstantin Ritt2013-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. when there were some engines with ref > 1 in the cache, prior to calling QFontDatabase::{add,remove}ApplicationFont()/removeAllApplicationFonts() (QFontCache::clear() has never decreased engine's cache_count); 2. when the QFontEngineData's engine is not in cache i.e. the Box or Test font engine (~QFontEngineData() didn't free engines it keeps). Instead of using the font engine's (external) "cache_count" counter, QFontCache now references a given font engine every time it is inserted to the cache and dereferences exactly that number of times in clear(). Change-Id: I87677ebd24c1f4a81a53526f2e726e596b043c61 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make sure that we #include qconfig.h before testing for features.Thiago Macieira2013-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but it's a good idea even in private headers, in case someone includes that header first somewhere. In particular, all platformsupport API is private. Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* | Fix build on MinGW, Win<7Konstantin Ritt2013-03-141-2/+2
| | | | | | | | | | | | | | | | /* broken by 26149d057a464ddafcc9694cfa94525c01a45231 */ Change-Id: I63f4d70e2a6fc1f8f1b302d188cf34d1abb0699c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Make qaccessible2.h internal.Frederik Gladhorn2013-03-143-3/+3
| | | | | | | | | | | | | | | | | | | | | | This should have been done right from the start, instead we only made the documentation internal. Also remove the classes from the BIC data. Change-Id: I238a7a7cc5d26980b23931c78e7e5a4477d46920 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Fix build with Windows SDKs pre 7.0.Friedemann Kleint2013-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | Check whether the IShellLibrary interface exists. Task-number: QTBUG-29447 Change-Id: I93fc54a1e6d5c090f7c1768c756571ba57a7b2d2 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Hide Harfbuzz from the outer worldKonstantin Ritt2013-03-131-4/+0
| | | | | | | | | | | | | | | | Don't export, don't generate private headers, don't mention HB in API. Change-Id: I048ebd178bf4afaf9fda710a00933b95274cf910 Reviewed-by: Josh Faust <jfaust@suitabletech.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Get rid of qt_determine_writing_systems_from_truetype_bits()Konstantin Ritt2013-03-122-126/+2
| | | | | | | | | | | | | | Move this code to QPlatformFontDatabase and get rid of all dups of it. Change-Id: Idea6c84819039bf3b345b1305305951ade8d1ac4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix wrong initial positionCaroline Chao2013-03-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | If the widget is larger than the screen, its title bar top left corner will be shown inside the screen. Task-number: QTBUG-30142 Change-Id: Id93773874be3616b3ef4b9bee6e1bb751c541d7b Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Windows: Use arrow cursor for toplevels with no cursor set.Friedemann Kleint2013-03-121-2/+15
| | | | | | | | | | | | | | | | | | | | Fixes unsetting the cursor in Qt Quick Controls. Task-number: QTBUG-28879 Change-Id: I049beafaa723f6e782df872f14c09b7f927e70ac Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-063-1/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreen.cpp src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
| * | Avoid setting initialNameFilter when mode is DirectoryIrfan Omair2013-03-051-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-30001 Change-Id: I5e854ce99137bd9d718cb2052f2c8dc1fb92b78f Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * | Windows: Repaint when switching off layered windows by opacity.Friedemann Kleint2013-03-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-29010 Change-Id: I565a800e5a5b4870bd3ee2e3fb3f55523334425f Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | Fix Alt key capture issue with mouseWheelIrfan Omair2013-03-011-0/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-29820 Change-Id: I8932b7bcadd6495debda6cdf0a576f83a0ccad47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-053-13/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Disable maximize button for fixed-size windows.Friedemann Kleint2013-02-271-8/+7
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28407 Change-Id: I5bab7fcf4ad3ecc7008ef02b9d3575d75893895d Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * | Fix warnings about extra tokens after preprocessor directive.Friedemann Kleint2013-02-251-1/+1
| | | | | | | | | | | | | | | Change-Id: I7f18ec42f6f6dd697947654384767c2c6b211498 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * | Transient QWindows centered; default-constructed geometryShawn Rutledge2013-02-241-2/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default-constructed geometry does not mean put the window at 0,0, and it does not mean center the window on the screen: it means let the window manager position the window. If the window is explicitly positioned at 0,0 though, that is a higher priority than the transient hint; without this change, the transientFor property had no effect. On X11, transient means use center "gravity" to make the transient window exactly centered. But the user can still override the geometry of a transient window, as with any window. On OSX and Windows, neither transient window functionality nor smart initial positioning are provided, so a window with no position set will be centered on the screen, and a transient window will be put at the center of its transientParent. Change-Id: I4f5e37480eef5d105e45ffd60362a57f13ec55f5 Task-number: QTBUG-26903 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>