summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetwindow_qpa.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix QtWidgets compilation for -qconfig largeTasuku Suzuki2012-05-231-0/+6
| | | | | Change-Id: I90ea78944546e93debb41c901d9f128a7b29b1f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QWidgetWindow: handle ShortcutOverride eventsBradley T. Hughes2012-05-221-0/+1
| | | | | | | | | ShortcutOverride events sent to the QWindow should be handled by the QWidget. Change-Id: Icec504db1066871b02dec639e4c1c624b0afeaa8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Keep object name of QWidgetWindow in sync with the widget.Friedemann Kleint2012-05-101-0/+11
| | | | | | | | Use new objectNameChanged() signal. Change-Id: I247566bd51d23ec65ff74ba9ac7be0d18e8ff160 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Don't handle window events after Qt::WA_DontShowOnScreen is setBradley T. Hughes2012-05-091-0/+6
| | | | | | | | | | | | | | | QWidget can set WA_DontShowOnScreen while visible, which generates events when the QWidgetWindow is hidden. This causes QWidgetWindow::handleExposeEvent() to clear the WA_Mapped flag which was set by QWidgetPrivate::show_sys(). Once WA_Mapped is cleared, the QWidget becomes non-functional, causing failures in at least tst_QGraphicsProxyWidget::paintEvent(), since paint events are not sent to widgets that don't have WA_Mapped set. Change-Id: I2d3e5b3baffb07ab73f41520771866f181260bd2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improve widget geometry.Friedemann Kleint2012-05-091-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | - Rename posFromMove to posIncludesFrame in Widgets and make the handling more fine-grained; try to clean it up as soon as the frame margins are known in QWidgetPrivate::fixPosIncludesFrame(). - Implement QWidgetPrivate::updateFrameStrut(). - Windows: Handle posIncludesFrame in window creation, notify changed geometry after setting window flags. - XCB: Do not change the window gravity in propagateSizeHint() as this causes the window to jump around. Determine the gravity in window creation, leave it constant and fix the geometry when setting instead. - Store the normal geometry when maximize/fullscreen state change events are received. - Remove xfails from fixed tests Task-number: QTBUG-25331 Task-number: QTBUG-24905 Task-number: QTBUG-24294 Change-Id: I89c7229d86aaf88f02247d63915da7905e4a27ea Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix some unsigned comparison warnings.Stephen Kelly2012-04-181-1/+1
| | | | | Change-Id: I4e72dbb6e207757c8bb75a7726c83ed5916df094 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-3/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * Propagate window state changes to QWidget.Friedemann Kleint2012-04-111-3/+31
| | | | | | | | | | | | | | | | | | Apply the state in QWidgetWindow and send an event to the widget unless the code is triggered by QWidget::setWindowState(). Change-Id: Ibf2f4e730384e41636841b9216eecfdff35b7bcb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Fix QWheelEvent::angleDelta() returning QPoint().Marcel Krems2012-03-301-1/+1
| | | | | | | | | | | | Change-Id: I29460bd5a3f485dcd460edc52239d748e7faf6e0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-271-2/+8
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * Make sure windows send accessibility activated updates.Frederik Gladhorn2012-03-241-2/+8
| | | | | | | | | | | | | | | | Both QWindow and QWidgetWindow should update with the active state signal. Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-231-0/+9
|\| | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * FocusAboutToChange event to be send before focus changesPekka Vuorela2012-03-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Focus change happen as: FocusAboutToChange event -> focus change -> FocusOut event -> FocusIn event. Input method need to have focus when calling commit(). Notification on focus about to be lost allows QWindow implementations to commit in time. Also changes QWidget documentation to match code reality. Change-Id: I17a8a374a33dd700909f79e370b42348869261a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Got rid of Map / Unmap events in favor of Expose event.Samuel Rødal2012-03-221-10/+7
|/ | | | | | | | | | | | | | | | | | Since change 2e4d8f67a871f2033 the need for Map and Unmap events has gone away, as now the Expose event is used to notify the application about when it can start rendering. The Map and Unmap events weren't really used except by QWidget to set the WA_Mapped flag, which we now set based on the expose / unexpose. Also guarantee that a Resize event is always sent before the first Expose, by re-introducing an asynchronous expose event handler. Since an expose is required before rendering to a QWindow, show a warning if QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a window that has not received its first expose. Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix compiling with --no-accessibilityJerome Leclanche2012-03-151-0/+4
| | | | | | | | Adds missing QT_NO_ACCESSIBILITY checks where required to build without accessibility support. Change-Id: Id98ecdcb9b351289b21dc2d382100d0b63857db9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QWheelEvent high-resolution delta support.Morten Johan Sorvig2012-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support pixel-based deltas as well as sending dx and dy values in the same event. Keep source and behavior compatibility with Qt 4. New API: QPoint pixelDelta() const QPoint angleDelta() const Deprecate delta() and orientation(). Both pixel-based deltas and combined updates are necessary for smooth trackpad-based scrolling on OS X. Qt 4 compatible behavior is achieved by sending an extra wheel event in cases where the initial event has a combined dx and dy update. This extra event sends dx in delta() and orientation(), with pixelDelta() and angleDelta() set to null. Modify the Cocoa implementation to provide pixel deltas. It is expected that not all platforms can provide these. Angle deltas will always be available. Change-Id: I20c10f0df338ddcd6a3f7a4d40949ed5ae3b4795 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add a ThemeChange event.Friedemann Kleint2012-02-161-0/+6
| | | | | | | | | - Pass it from QWindowSystemInterface via QWindow to the widgets. - Add handler code from 4.8 / qapplication_win.cpp to qwidget.cpp. Change-Id: Ic759563aa00cb93fe014c1bf41020446c1927dec Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Handle TouchCancel in gui and widgetsLaszlo Agocs2012-02-101-1/+5
| | | | | Change-Id: I31739840348d88ae408ac1aae2399f6328ccdd43 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add native event filters to Windows, forward to Widgets.Friedemann Kleint2012-01-301-0/+5
| | | | | | | Use prototypically for qwizard_win.cpp. Change-Id: I075e81ae1bc3d62d9f27e51c73c800ffd71cbcd6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.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>
* Extend touch events.Laszlo Agocs2011-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability flags indicate which information is valid in the touch points. Previously there was no way to tell if e.g. the value returned by pressure() is actually the value provided by the driver/device or it is just something bogus due to pressure not being supported. The points' flags return information about the individual touch points. One use case is to differentiate between touches made by finger and pen. Velocity, if available, is now also exposed. Each touch point can now contain an additional list of "raw" positions. These points are not reported individually but are taken into account in some way by the underlying device and drivers to generate the final, "accurate" touch point. In case the underlying drivers expose these additional positions, they are made available in the lists returned by the touch points' rawScreenPosition(). The raw positions are only available in screen coordinates to prevent wasting time with mapping from global positions in applications that do not use this data. Instead, apps can query the QWindow to which the touch event was sent via QTouchEvent::window() and can call mapFromGlobal() manually if they need local raw positions. The capability and device type information is now held in a new QTouchDevice class. Each touch event will contain only a pointer to one of the global QTouchDevice instances. On top of type and capability, the new class also contains a name which can be used to differentiate between multiple touch input devices (i.e. to tell from which one a given QTouchEvent originates from). The introduction of QTouchDevice has three implications: The QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent need to be changed (to pass a QTouchDevice pointer instead of merely a device type value), and each platform or generic plug-in is now responsible for registering one or more devices using the new API QWindowSystemInterface::registerTouchDevice. Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make input events work for widgets on waylandJørgen Lind2011-11-281-1/+1
| | | | | | | Wayland windows does not know about their position Change-Id: Ia37dd0fe6e33073eeeba22c88da9bd4bcad5421f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Prevent timestamps in widgets' touch events from disappearingLaszlo Agocs2011-11-041-1/+1
| | | | | Change-Id: I096914eb2b02ad9c4a5c0462a1f4b76ef17c3957 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add virtual QWindow::focusObject() methodLars Knoll2011-10-221-5/+12
| | | | | | | | | | The method allows to retrieve the object that currently has the input focus inside the Window. This is e.g. required to correctly determine the context for keyboard shortcuts. Change-Id: I9e05ef62717973bac275ce34cc70fb86aa2d1e5b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added QWindow::isActive() and focus in / out events.Samuel Rødal2011-10-051-0/+6
| | | | | | | | | | | Renamed QGuiApplication::activeWindow() to QGuiApplication::focusWindow(), implemented QWindow::isActive() as a style hint, and added focus in / out events. Change-Id: I71866e76c5a817def3e17bcc20a4fc32081a0e7a Reviewed-on: http://codereview.qt-project.org/5811 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Cocoa: Send proper mouse coordinates.Morten Sorvig2011-10-031-1/+1
| | | | | | | | | | | | Clear up coordinate system confusion. Also change QApplicationPrivate::pickMouseReceiver to indicate that, yes, it does modify the 3rd argument in addition to returning the mouse receiver widget. Change-Id: If2c44eff65aedfdc78c6da1728f31d6e2db71f9d Reviewed-on: http://codereview.qt-project.org/5919 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Refactor accessibility for Qt5Jan-Arve Saether2011-09-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Moved most stuff to gui\accessible * Moved widget-specific stuff to widgets\accessible * Moved platform-specific code to either the bridge plugin (this was already the case) or to the platform plugin. * Added several classes and functions. These have not yet gone through an API review. The plan is to do that in a later commit. Classes: - QPlatformAccessibility - QWindowsAccessibility Functions: - QWindow *QAccessibleInterface::window(); - QPlatformAccessibility *QPlatformIntegration::accessibility() * The bridge code can now either be a plugin or integrated into the platform plugin * Mac accessibility is left out for now. Unix "should still work" (tm). These platforms should be fixed soon. Change-Id: Ib49ffa73b647ee0af90864544c2769440157f562 Reviewed-on: http://codereview.qt-project.org/5330 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fixed tst_QWidget::updateWhileMinimized()Samuel Rødal2011-09-261-0/+1
| | | | | | | | | | | | The QBackingStore::sync() call after the first expose when the widget is un-minimized is discarded due to Qt::WA_Mapped being false. Since there might be backing store syncs pending on Qt::WA_Mapped being set we should also call syncBackingStore() when we get the map event. Change-Id: I762545dc0522a99f0b36ce9a2cd2f45894cb40a5 Reviewed-on: http://codereview.qt-project.org/5377 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed wrong mouse coordinate mapping.Samuel Rødal2011-09-191-4/+1
| | | | | | | | | | QApplication::pickMouseReceiver() does the appropriate mapping if the receiver changes. Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac Reviewed-on: http://codereview.qt-project.org/5148 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-151-17/+17
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add timestamp to QInputEvent.Laszlo Agocs2011-09-051-0/+2
| | | | | | | | | | | | | | | | The mouse, touch, key events have no timestamp field currently, meaning that the timestamp passed to QWindowSystemInterface's handleMouse, Touch, KeyEvent functions will not be stored in the generated events. The timestamp can be quite valuable in some cases (e.g. when performing filtering of touch events) so losing this information is not desirable. The patch adds a timestamp field to QInputEvent, which is the base for mouse, touch, key, and other events, and also makes QGuiApplication to store the timestamp in the generated events. Change-Id: Icb9de8b238cb341916eac33ce21603f4955baca7 Reviewed-on: http://codereview.qt.nokia.com/4196 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Refactor QMouseEvent to contain the position inside the windowLars Knoll2011-09-011-2/+2
| | | | | | | | | | | | | | Rename the default accessors for positions to localPos, windowPos and screenPos, to be explicit about their use. Introduce a QT_NO_INTEGER_EVENT_COORDINATES define so one can make sure to always use the float based coordinates. Fixup all Qt code to use the correct constructor that specifies all three coordinates. Change-Id: If4bb93b8d1e2eb2440260d99680c468706cfe68f Reviewed-on: http://codereview.qt.nokia.com/4058 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Touch event support for QWindow.Laszlo Agocs2011-08-311-0/+11
| | | | | | Change-Id: I83ddc48a9093856d975b25f0426db96264afeeef Reviewed-on: http://codereview.qt.nokia.com/3920 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add WindowStateChanged event.Friedemann Kleint2011-08-051-0/+14
| | | | | | | | | Not currently considering activation state. Change-Id: Iea9265d35536947b6cc85639bd9839e9fda69bdf Reviewed-on: http://codereview.qt.nokia.com/2609 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Compile fix (region is an accessor now, not a public member variable).Samuel Rødal2011-06-221-1/+1
|
* Use XCB_GRAVITY_STATIC in XCB plugin for frame independent geometry.Samuel Rødal2011-06-101-1/+1
|
* Added frameMargins() API and support in XCB plugin.Samuel Rødal2011-06-101-2/+13
|
* Made tst_QWidget::updateWhileMinimized() pass.Samuel Rødal2011-06-061-0/+28
| | | | | | | | | | This requires adding a couple of window system interface events, namely Map, Unmap, and Expose. When a widget is minimized on X11 it is unmapped, and thus update requests should not be delivered. Instead the event will delivered when the widget is mapped, which causes an Expose event to be sent. The Unmap and Expose event thus need to be handled in QWidgetWindow, and Map is also added for the purpose of API symmetry (and for future needs).
* Add support for mouse and keyboard grab.Laszlo Agocs2011-06-031-5/+5
| | | | Reviewed-by: Samuel Rødal
* Add focus and modal dialog support.Laszlo Agocs2011-05-301-0/+11
| | | | Reviewed-by: Samuel Rødal
* implement dragging between top levelsLars Knoll2011-05-221-2/+0
| | | | | | Correctly make use of the topLevelAt() functionality to determine which QWindow should get the drag events.
* re-add in-process DnD implementationLars Knoll2011-05-221-0/+67
| | | | | | Get in-process DnD working again. QDragManager only cares about QWindow's now, and QWidgetWindow maps this to DnD events inside the widget hierachy.
* Deliver leave event to proper widget (not the top-level).Samuel Rødal2011-05-111-1/+2
|
* Improved popup and mouse event handling.Samuel Rødal2011-05-111-23/+100
| | | | | Use QApplicationPrivate::sendMouseEvent() to ensure hover events are sent. Copy most of the popup handling code from qapplication_x11.cpp
* Prevent crash in QWidgetWindow::handleMouseEvent().Samuel Rødal2011-05-101-3/+10
| | | | Don't use mapFrom() between widgets not in the same hierarchy.
* library splitLars Knoll2011-05-071-0/+188