summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-9/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * XCB: do not assume that sizeof(long)==4Alberto Mardegan2013-11-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | The code was using the "long" type when a 32 bit type was actually needed. This can cause bugs in those systems where "long" is 64 bits wide, such as Linux x86-64 (which is LP64). Task-number: QTBUG-34861 Change-Id: Iab289b2af3847dd62d8b4ecea51896936ca4c7a2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * xcb: Act on the _NET_ACTIVE_WINDOW eventJørgen Lind2013-10-301-3/+6
| | | | | | | | | | | | | | | | | | | | It happens that we don't get a focus inn event for top level windows when focus goes from a window mapped. But we do get a _NET_ACTIVE_WINDOW event. Task-number: QTBUG-34426 Change-Id: Id1d9eb708a968e0e8934e56dec19abe2dd203bc7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Silence the _COMPIZ_DECOR_* warnings on UbuntuJørgen Lind2013-10-301-0/+4
| | | | | | | | | | | | | | | | | | Earliest occurrence is to my knowledge in 12.04. It is still unclear how to act on those messages Change-Id: I7da48281c6bec973448a1d4cd800d445a80695a2 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Add swapInterval to QSurfaceFormatLaszlo Agocs2013-11-131-1/+1
|/ | | | | | | | | | | | | | | Implement swap interval support for EGL, GLX and WGL. The environment variable QT_QPA_EGLFS_SWAPINTERVAL is renamed to QT_QPA_EGL_SWAPINTERVAL and can be used to override the applications' setting of the swap interval. Task-number: QTBUG-31939 Change-Id: I644325d5d3306b7604bffd7efccda3c00ed37d36 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* set the title of the user time window not the application windowShawn Rutledge2013-10-151-1/+1
| | | | | | | | | 51c28cad67077500f63dbe8c0060ed19cf340c0d resulted in setting the title of the wrong window. Task-number: QTBUG-34048 Change-Id: Ia22d563e0ba9b0e074ef79ae5169c1627369c70d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* xcb: every window should have a title in debug modeShawn Rutledge2013-10-091-0/+11
| | | | | | | | | | | | Qt creates various invisible windows for internal purposes. Giving them all titles makes the output of tools like xprop and xwininfo more readable, which makes solving certain bugs (like transient-window bugs) easier. Task-number: QTBUG-33644 Change-Id: I9d37b40d3339fb0f81ffeae64949b88ecb655474 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-4/+0
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * xcb: QWindow never uses XCB_GRAVITY_CENTERShawn Rutledge2013-09-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Center gravity doesn't mean center the window, it only affects the method of converting between internal window bounds and decorated bounds. So wanting to have each dialog centered w.r.t. its transient parent is not a reason for using center gravity. Instead it caused the bug that when you resize a QMessageBox by clicking the Show Details button, it jumps downwards on the screen. Task-number: QTBUG-32473 Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Remove qFind usages from the XCB pluginGiuseppe D'Angelo2013-09-061-8/+10
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ieccef12c617276d0526ce2876fd76e37b4240a43 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Compile fix in qxcbwindowhjk2013-09-051-1/+1
| | | | | | | | | | | | | | | | There was a error: narrowing conversion of 'Myns::XEMBED_VERSION' from 'unsigned int' to 'long int' inside { } [-Werror=narrowing] Change-Id: I1e155870b0b632bfe5ffa9deac69c4f151f5aa23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | XCB: Suppress warnings about unhandled client messages.Friedemann Kleint2013-08-211-3/+5
| | | | | | | | | | | | | | | | | | | | | | Introduced by the tray icon refactoring d8090022f66cc6cff6af5ed2ae702212fd172ff7 among other things. Task-number: QTBUG-33068 Change-Id: I7c536c68acc2fae39ca30afb401500d0dc8701b1 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-08-161-2/+6
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-2/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Fix QDialog position shift bug after resize.Balazs Domjan2013-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Linux (XCB), resizing a dialog shifts its position. The fix corrigates the geometry of the dialog to the right values. Task-number: QTBUG-32473 Change-Id: I6d38539a3ebc3b95eacc7f13a76f83fc9e4d821c Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * xcb: mouse wheel does not focus a windowShawn Rutledge2013-07-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The window should react to the wheel event (e.g. scroll content) but without becoming focused; this is the X11 convention. Task-number: QTBUG-32517 Change-Id: I7e12425e5a6e1549b7f23dc318612a436c24d14b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | XCB: Ignore _NET_WM_PING on the root windowUli Schlachter2013-08-161-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a _NET_WM_PING message, a window manager can check if an application still works or if it froze. The WM sends such a message to the application window and the application sends the message back to the root window. Since change Ia04268b0 / commit d8090022f "Move the X11 system tray code from widgets into XCB-plugin.", Qt selects StructureNotifyMask on the root window. Due to this, we now also receive replies to _NET_WM_PING and treat them like a _NET_WM_PING request. This caused an endless loop as soon as any _NET_WM_PING was seen where Qt would send a _NET_WM_PING to itself and handle it again and again. Fix this by ignoring _NET_WM_PING messages that are sent to the root window. According to EWMH, such messages can only be replies to _NET_WM_PING and GTK does this, too. Task-number: QTBUG-32957 Change-Id: I1b0aa682f99b17d633baacc14b18b3adca7a1aba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Implement support for global whatsthis on WindowsSimon Hausmann2013-08-131-2/+1
| | | | | | | | | | | | | | Task-Number: QTBUG-32835 Change-Id: Ifee10d815ce0037c96eda574ab9e1af67ff6bd78 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Move the X11 system tray code from widgets into XCB-plugin.Friedemann Kleint2013-07-301-0/+3
|/ | | | | | | | | | | | | | | | | | - Add system tray tracker class to XCB plugin and provide functionality via invokable slots of the native interface. - Remove XLib-dependency of widgets/utils. - Reintroduce tracking of tray window destruction and recreation, which was removed in the XLib-code when porting it from Qt 4 to Qt 5. This paves the way for implementing the tray icon completely in terms of QPlatformSystemTrayIcon at some point later. Change-Id: Ia04268b0e2919c05874a3e9548930535332897c7 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Prevent activation of windows with Qt::WindowDoesNotAcceptFocus.Friedemann Kleint2013-07-221-1/+2
| | | | | | Task-number: QTBUG-32385 Change-Id: I307e2a3e5157b351663940d5d02fc16b3127b5dd Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* XCB: Set WM_CLASS.Friedemann Kleint2013-07-181-0/+7
| | | | | | | | | | Set the instance name and class name of the application windows. Task-number: QTBUG-29396 Change-Id: Ia1fb492ab169108c3779deb8964bb731b322dd89 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix system tray icon on X11.Friedemann Kleint2013-06-281-1/+1
| | | | | | | | | | | Observe Qt::BypassWindowManagerHint in XCB and use it for the tray. Remove the call to XSync(), which sometimes was causing the window to appear in the wrong place for a short time. Task-number: QTBUG-31762 Change-Id: I7b4fc5e42b8c8bb9d03b1575be99d6d1c727be37 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-271-2/+2
|\ | | | | | | refs/staging/stable
| * Fix missing focus events for mapped child windowsJørgen Lind2013-06-211-2/+2
| | | | | | | | | | | | | | | | | | Its a bit brutal Task-number: QTBUG-31776 Change-Id: I2d8b530646d1e2b2ba86f0e82d76f928c9a2bb11 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Mac/XCB/Windows: Fix initial setting of window icons.Friedemann Kleint2013-06-261-0/+2
|/ | | | | | | | | | Setting an icon on a QWindow before creating the platform window did not have any effect. Task-number: QTBUG-31961 Change-Id: I8e58a3b239c8bc69af58f765e7826337463d2201 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix possible segfault when setting up window's transient parentShawn Rutledge2013-04-301-1/+1
| | | | | | | | tp->handle() can be null. Task-number: QTBUG-30919 Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Add QXcbWindowEventListenerJørgen Lind2013-04-261-3/+14
| | | | | | | | This makes it possible to listen for events on xcb_window_t which are not platformwindows inside the xcb plugin Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Respond to the _NET_WM_CONTEXT_HELP WM_PROTOCOLS messageJan Kundrát2013-04-241-0/+5
| | | | | | | | | | | | | | | | This change restores a proper function of the "(?)" button in the window decorations which is used as a clue for the user to check what a particular widget is supposed to do. The change is only implemented for QtWidgets because the underlying QWhatsThis is inherently widget-specific -- which is why it sends an event to QGuiApplication, but only processes it in the QtWidget-specific QApplication. Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch. Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement startup notification spec again.David Faure2013-04-231-0/+4
| | | | | | | | | | | | | | | | | This functionality was in Qt4's qapplication_x11.cpp and was missing from the XCB QPA plugin. Ported the code from xlib to xcb. This code was actually tested (with plasma), unlike the Qt-4.8 code which skipped every other character... for (uint i = 0; i < 20 && i + sent <= length; i++) xevent.xclient.data.b[i] = message[i + sent++]; Provide a QPA native-function for accessing the startup id, for cases where an application doesn't show a window, but starts another app instead, or asks a running app to show the window on its behalf. Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a Reviewed-by: David Faure (KDE) <faure@kde.org>
* qxcb: output clear error message when running on an 8-bit displayDavid Faure2013-04-231-1/+3
| | | | | | | | | | | | | | | Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth) outputs a stream of error messages, starting with: QWidget::paintEngine: QWidget::paintEngine: Should no longer be called Better output clearly the reason why we end up in that method: painting on a null image, due to the unsupported image format. Maybe this should even be a qFatal... Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement alertion state for windows.Friedemann Kleint2013-04-191-0/+14
| | | | | | | | | | | | | | 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>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-201-9/+233
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * XCB: don't map hidden windowsAlberto Mardegan2013-03-151-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced by the XEMBED implementation (carried over from Qt4, but there it applied to QX11EmbedWidget only): the _XEMBED_INFO property is used to inform the *embedder* whether the embedded window should be mapped when embedded. Task-number: QTBUG-30084 Change-Id: I8d1c467874bdee3300a1b18b8174b2d62f498713 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * Implement XEmbed protocolAlberto Mardegan2013-03-061-9/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a static QWindow::fromWinId(WId id) constructor which can be used to create a QWindow object representing windows created by other processes. Then, QWindow::setParent() can be used to embed a window into a foreign window socket and QWindow::setTransientParent() to stick the current window on top of a foreign window. The changes in the QtWidgets module ensure that the focus chain (TAB navigation) correctly works when a QtWidgets-based window is embedded into another application. As far as the platform implementation is concerned, this commit only implements the embedding functionality in the XCB plugin. So, this is roughly equivalent to the Qt4 QX11EmbedWidget functionality. Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Fix sluggish resizing for opengl windows on X11Shawn Rutledge2013-03-131-4/+7
|/ | | | | | | | Disable sync protocol for OpenGL surfaces in the XCB plugin. Task-number: QTBUG-29304 Change-Id: I4cb47b04637e15e012758d3b0840abd13d27df69 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Transient QWindows centered; default-constructed geometryShawn Rutledge2013-02-241-13/+36
| | | | | | | | | | | | | | | | | | | 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>
* Fix focus handling of native child widgets in xcb.Gunnar Sletta2013-02-191-1/+13
| | | | | | Change-Id: If4d596195624011142bff6853849a23064e478df Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit fc663b5f9aae16fe6a03160e3eb148a5f742ac58)
* Factorize code for formatting window titles into QPlatformWindow.David Faure2013-02-061-11/+1
| | | | | Change-Id: I0dcccd08916fc2ea1b795681e9b98a9550ef51b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* XCB: Force XSync after creating WindowKai Koehne2013-01-151-0/+5
| | | | | | | | | | | | Make sure that dpy->request == dpy->last_request_read after setting up a new window. If we don't do this, last_request_read might never be updated until the difference hits a limit that can lead to hangs in the application (see e.g. QTCREATORBUG-8373). Task-number: QTBUG-29106 Change-Id: I390493ca6f966dc105d3ea3a2c48abec01177bc2 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* XCB: add support for getting and setting appTime and appUserTime.David Faure2012-12-141-0/+1
| | | | | | | | | | | | The QX11Info class needs this. This required adding the missing nativeResourceFunctionForScreen in QPlatformNativeInterface. Change-Id: I2c6e91c7f122f3ecdf769a177deafd2aa3896e2f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix empty window title regression, add application display name to window titleDavid Faure2012-12-141-1/+12
| | | | | | | | | | | | | | | This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fixed incorrect handling of extra mouse buttons in XCB platform plugin.Samuel Rødal2012-12-141-58/+10
| | | | | | | | | | | | | | | | | | | | | | translateMouseButtons() was only able to correctly handle the left, right, and mid mouse buttons. Thus, if any buttons outside of those were pressed, the motion notify event would basically unset the mouse button mask, leading to a release event being sent instead. Later on, when the actual release event arrives, that button gets xor'ed into the empty button mask generating another press, and later another motion event will generate a release. In the end that means two press-release sequences are sent for any extra mouse buttons. Instead of getting the mask of the buttons currently being pressed from the event, we need to keep track of the mask ourselves. Task-number: QTBUG-28561 Change-Id: Iaa67e784a13d792deef8fc29dbd5456a5471a861 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QWidget::setWindowOpacity() when called before show().Friedemann Kleint2012-12-121-0/+4
| | | | | | | | | Pass opacity from the QWidget to QWindow and to the platform windows. Task-number: QTBUG-28477 Change-Id: If5a85d9183bd1ca33dac2052936ecd1e6c0b5f6c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Made QWidget::setWindowOpacity work with the XCB platform plugin.Samuel Rødal2012-12-121-0/+17
| | | | | | | | | Ported the rather trivial implementation from Qt 4. Task-number: QTBUG-28477 Change-Id: I44e14a3c150af43c6b9b880242b655fe06084fd7 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fixed excessive enter/leave events being generated with the xcb plugin.Samuel Rødal2012-11-231-2/+39
| | | | | | | | | | | | | | | | | | | | | When we get a leave event we peek ahead in the queue to see if there's an enter event already pending. If so we use QWindowSystemInterface::handleEnterLeave() instead of two separate window system interface events, so that you don't get leave and enter events for the whole parent chain when moving the mouse cursor between two neighbouring native child widgets. We skip VIRTUAL events as they are generated for parent windows, and we only care about the bottom-most window that is being entered / left. Qt can take care of the rest since it knows the QWindow hierarchy. We need to not skip leave events with detail set to INFERIOR, since Qt expects to get a handleEnterLeave() when the mouse moves from a parent window to a child window. Task-number: QTBUG-27550 Change-Id: I7457d2e59d8b694081f2e43a16cd2e58d769624e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Added expose and configure event compression in xcb platform plugin.Samuel Rødal2012-11-141-1/+44
| | | | | | | | | We had this in 4.x to prevend swamping the event queue and causing a lot of needless processing of stale events. Task-number: QTBUG-27734 Change-Id: I020fe44885569f5a68c07220fcb44bea3e138089 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-101-1/+3
| | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-071-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>