summaryrefslogtreecommitdiffstats
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
* Remove useless method QWaylandShmBackingStore::hiddenJohan Klokkhammer Helsing2016-11-113-8/+0
| | | | | | Change-Id: I8e28d3c1dc2c2bbff4517ffe3b2f63c2ac86b95f Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove QWaylandWindow::shellManagesActiveStateJohan Klokkhammer Helsing2016-11-1010-18/+37
| | | | | | | | | | | | If m_shellSurface was deleted, there was no way for QWaylandDisplay to know whether the shell handled window deactivation or not. The shell integration now always handles the window active state. The default implementation of QWaylandShellIntegration will make a window active on keyboard focus. Change-Id: I80cfce9976b1d3c57094fdd8980c9110b873f239 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Follow the protocol for nested xdg_popupsJohan Klokkhammer Helsing2016-11-102-4/+21
| | | | | | | | The previous implementation sent the wrong parent for nested popups and used a new serial for each popup instead of reusing the one for the current grab. Change-Id: I22b1cbe997a64562d47275821c9146157c51bc42 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8Paul Olav Tvete2016-11-1022-19/+110
|\ | | | | | | Change-Id: Ibfe6fe6ed983b537d55544883b7dc75e5cc3fc37
| * Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-11-1022-18/+121
| |\ | | | | | | | | | Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
| | * Client: Cleanup mouse state after dragJohan Klokkhammer Helsing2016-11-102-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue where dragging with the mouse would cause the next touch event to not generate a synthesized mouse press event. The touchDrag test can now be run directly after the mouseDrag test without failing. Task-number: QTBUG-56187 Change-Id: I53cc5f90fc8d8672936b23f54a017687d41c31fc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Client: Fix touch getting stuck after drag-and-dropJohan Klokkhammer Helsing2016-11-093-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | wl_touch.up is not sent by compositors when dragging, so release all touch points when the drag ends. Task-number: QTBUG-56187 Change-Id: I1c3d03c72e75a551355c50bb5d82433f5e2e35f0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Don't create new xdg surfaces in updateTransientParentJohan Klokkhammer Helsing2016-11-091-1/+3
| | | | | | | | | | | | | | | Change-Id: I1644a75269fec40644f02eeb275d9e6b98995c0e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix build when some features are disabledPaul Olav Tvete2016-11-0720-13/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QtWaylandClient compile when Qt is configured with: -no-opengl -no-accessibility -D QT_NO_CLIPBOARD -D QT_NO_DRAGANDDROP -D QT_NO_SESSIONMANAGER Task-number: QTBUG-56192 Change-Id: Idc6aae6b36a35515109a27bed31a22e3e909ef27 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Client: Call parent requestUpdate after changing subsurface positionJohan Klokkhammer Helsing2016-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setPosition on a child window would not send the appropriate commit request after the wl_subsurface.set_position request. Task-number: QTBUG-52118 Change-Id: I792016ce7e0a5a2efd3a32a98727b43ee0275b0e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Client: Remove windows from keyboard focus list when destroyedJohan Klokkhammer Helsing2016-10-243-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the undefined behavior in tst_WaylandClient::touchDrag and mouseDrag Note: The test still fails if run twice in a row, but it appears to be deterministic. Task-number: QTBUG-56187 Change-Id: Ib45d82224f004d1324f2ce4d6b7df05ee36c04f5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 0049240a2b7d8691f09224e1542919ddbbb0d864) Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * Don't return a null QMimeData from the clipboardGiulio Camuffo2016-10-172-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for QClipboard::mimeData() doesn't say that the returned value can be null, and some clients just dereference that without checking. So instead return an empty QMimeData. Change-Id: Ieec3140af4e7f33cde98ed96fd96b2674d0d0f9f Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | Call formatWindowTitle on the window titleMartin Gräßlin2016-10-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to QWidget::setWindowTitle documentation the QPA plugin is responsible for adding the application name to the window title. As it's supposed to be done for Unix platform the Wayland QPA also needs to perform this task. Task-number: QTBUG-56475 Change-Id: Ib261c68d08ca06d1ec4734c8c215a4ceb059fae3 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Fix memory leaksGiulio Camuffo2016-11-032-47/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fields in QWaylandIntegration were never deleted, so use QScopedPointer to handle that. Also use QScopedPointer for all the heap allocated fields of the class. Change-Id: I4c33be4157a6e17abfa1610f84ef9a88afe5f38a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | use modularized platformsupport modulesv5.8.0-beta1Oswald Buddenhagen2016-10-223-6/+11
| | | | | | | | | | | | | | | Change-Id: I7883470e22deb089240d86df7dc2d625a107a53e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Don't try to deliver event to destroyed windowPaul Olav Tvete2016-10-112-2/+4
| | | | | | | | | | | | | | | Change-Id: If1c57250e2dc9e0d55767bbdfb15c3e3f5d9b333 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Client: Remove windows from keyboard focus list when destroyedJohan Klokkhammer Helsing2016-10-113-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the undefined behavior in tst_WaylandClient::touchDrag and mouseDrag Note: The test still fails if run twice in a row, but it appears to be deterministic. Task-number: QTBUG-56187 Change-Id: Ib45d82224f004d1324f2ce4d6b7df05ee36c04f5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Fix race condition on mFrameCallbackPaul Olav Tvete2016-10-062-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | Don't try to destroy the callback from two different threads. This caused a crash with brcm-egl. Change-Id: Idcb18fca9ed7f84902b88212c0cebd67932a59d3 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Make sure we send frameSwapped signalsJohan Klokkhammer Helsing2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandWindow::deliverUpdateRequest() may trigger a new requestUpdate, so we must clear the mUpdateRequested flag first, so we don't accidentally clear the flag that belongs to the next update. Fixes missing updates on brcm-egl. Change-Id: Ib0decd5e8eb58505ccb94e93de494163ce0fd2ec Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Include headers with full pathPier Luigi Fiorini2016-10-015-8/+8
| | | | | | | | | | | | | | | | | | | | | Fix build of programs using the private API outside QtWayland. Change-Id: Ib43ed1be8df8be3cc7b67588003cd7f0a6ff6eb1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-203-2/+7
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshell.cpp Change-Id: Ic45b930e01fec803287d63b6f2347f45b7638ffc
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-173-2/+7
| |\| | | | | | | | | | Change-Id: If43a69c30682eab4a40149a03c619047e84c9f6d
| | * Fix build with QT_NO_ACCESSIBILITYSamuli Piippo2016-09-162-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | The accessibility() function is ifdef'd in the base class, which makes build fail when Q_DECL_OVERRIDE is used here. Change-Id: Ic3d800ccf32b39f5bc8d3f94d222bc0d34457057 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Remove or add window decorations when toggling fullscreenJohan Klokkhammer Helsing2016-09-051-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-55343 Change-Id: I38e94a70585ba93d40de22698fda80530cf2156d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Warn if using QWaylandClientExtension without a Wayland pluginJohan Klokkhammer Helsing2016-09-191-0/+5
| | | | | | | | | | | | | | | | | | Change-Id: Ibbf6acab4af45a6b17089bd3809c33a199dc89f6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Only bind the extension oncePaul Olav Tvete2016-09-181-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I014269a19ca569298df91c2c329193e5ee5ff9c5 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Cleanup and null ptr checkPaul Olav Tvete2016-09-181-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash if we ask for the surface before the window is created. Also clean up NULL/0/nullptr and a c-style cast. Change-Id: I2a5a66ee76a3a12c8ca32847dbe30cc640e924c2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Fix FramelessWindowHintPaul Olav Tvete2016-09-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | setFlags() works just like setWindowState(): we have to use the supplied parameter because the window's state hasn't been updated yet. Change-Id: I223e01ef192f30911697e449669e745f0ad59d99 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Don't assume we always have a shellPaul Olav Tvete2016-09-052-4/+3
| | | | | | | | | | | | | | | | | | | | | The mininimal-cpp compositor example does not have any shell extensions. Change-Id: Ifec2822ef4f5944eed02c19ddfc47419051364a4 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-2820-59/+531
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandseat.cpp src/compositor/compositor_api/qwaylandview.cpp tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/testinputdevice.cpp tests/auto/compositor/compositor/testinputdevice.h tests/auto/compositor/testinputdevice.cpp tests/auto/compositor/testinputdevice.h tests/auto/compositor/testseat.cpp tests/auto/compositor/testseat.h Change-Id: I98e045908dd964e5d4120bd35e71b8839c0d923a
| * | Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-08-264-8/+26
| |\| | | | | | | | | | Change-Id: I6784a53fcc2f0f68b8e916181cb8cdef263782b8
| | * Merge remote-tracking branch 'qt/5.6.2' into 5.6Paul Olav Tvete2016-08-263-7/+17
| | |\ | | | | | | | | | | | | Change-Id: Ie6ec1ae90396619214cf1f29ae9595c5f1915e10
| | | * Client: Fix keyboard focus logic and crashJohan Klokkhammer Helsing2016-08-263-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous solution did not check for nullptr before dereferencing, which caused a crash. Furthermore, it checked the new ShellSurface's shellManagesActiveState before deciding whether to unfocus the old one. Task-number: QTBUG-55526 Change-Id: I410b6200a5b7b86806f70970730045a4a25f21db Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | Pass TRANSIENT_INACTIVE flag for windows with WA_ShowWithoutActivatingMartin Gräßlin2016-08-261-1/+9
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting a transient window also evaluate the state of the window attribute WA_ShowWithoutActivating. If that flag is set the transient should get the inactive flag as well. Task-number: QTBUG-55403 Change-Id: I757e5527e78f730a440e26abb52e84c9b2bb2f3a Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1117-52/+506
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylanddisplay_p.h src/client/qwaylandxdgpopup_p.h Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
| | * Client: Fix popup position for xdg shellJohan Klokkhammer Helsing2016-08-106-1/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Popups used xdg_surface instead of xdg_popup. It's not possible to set a position for an xdg_surface, because it's supposed to be a top level window (in xdg shell v5). Consequently, popups were treated as top level windows and positioned randomly on Weston. Using xdg_popup instead solves the problem. Task-number: QTBUG-55063 Change-Id: I223348677ef8a1ef1eee6a4c389276a6c802bcb5 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Make wl_shell and xdg_shell use the QWaylandShellIntegration interfaceJohan Klokkhammer Helsing2016-08-0913-40/+337
| | | | | | | | | | | | | | | | | | | | | | | | This simplifies the code in QWaylandDisplay and hopefully makes it easier to implement a prioritized shell selection mechanism later. Change-Id: I2bb3a13f8acedb60a6606cb3a8b5b228095eadf9 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Client: Refactor window active stateJohan Klokkhammer Helsing2016-08-084-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | Let shell surface implementations decide if they manage activated state. Moves the logic out of QWaylandDisplay. Change-Id: I75c86df68a1a93f9b1d2bf378b6603215d0b0128 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix crash when dragging with touch without first having pointer focusJohan Klokkhammer Helsing2016-08-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Also add drag-and-drop tests for both touch and mouse. Task-number: QTBUG-54756 Change-Id: Ibfff48b1f2377022a8624e28e9f638076187ddca Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Remove logging of drag-and-drop dataJohan Klokkhammer Helsing2016-08-011-4/+0
| | | | | | | | | | | | | | | Change-Id: Ic66faf02f7d4eb82aa898a2858a0271a007460a0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-029-51/+125
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/minimal-qml/main.qml Change-Id: Ic34029a6aa77f2b359f40258a05421d82efd5b37
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-017-46/+118
| |\| | | | | | | | | | Change-Id: I75a8ddc0652f3c6f438ef98e940c9357450d29c6
| | * Fix high-DPI scaling of window decorations for shared memory buffersJohan Klokkhammer Helsing2016-07-111-10/+18
| | | | | | | | | | | | | | | Change-Id: I6833ab86ffdb4e37dad5108baddb7a54cfb5e9fa Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Use xdg_shell configure events to determine active windowJohan Klokkhammer Helsing2016-07-046-36/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the xdg_shell protocol, the compositor is allowed to set multiple active windows. Qt's model, however, allows only a single active window. In order to map between the models, a list of the compositor's active windows is kept in QWaylandDisplay in the order they were activated. Hence, the front of this list will always be the most recently activated window, and it will be mapped as Qt's active window. Previously keyboard focus was used to determine the active window, this method has been disabled for xdg_shell. Functionality for delaying the call to QWindowSystemInterface::handleWindowActivated has been moved from QWaylandInputDevice::Keyboard to QWaylandDisplay so the implementations can share the workaround. Task-number: QTBUG-53702 Change-Id: I878151f9c52ed09a8d6571c6208920436c3ca8fc Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| * | Fix clang compilation errorsJohan Klokkhammer Helsing2016-07-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Adds missing overrides and removes a private header generated by wayland-scanner from the public API. Change-Id: I53fc3f8bacca41821f0531aae02ca2a5da758e13 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| * | Fix the key code of key events when control is pressedGiulio Camuffo2016-07-042-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: I51a57a32d8263e663a48dac15881d685359bc91d Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Compile with -no-openglJohan Klokkhammer Helsing2016-07-202-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtWayland has not compiled without OpenGL for a while. This patch fixes the compilation issues and removes the old config variable, "QT_WAYLAND_GL_CONFIG" and instead checks for the presence of "opengl" in "QT_CONFIG". A new define is also introduced, QT_WAYLAND_COMPOSITOR_QUICK, because it may eventually be possible to use create a QtQuick compositor without OpenGL. Task-number: QTBUG-54322 Change-Id: Ica7b3b320212d4ae1f8b1053725b73c83739c73c Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Fix wrong path to qwaylandsharedmemoryformathelper_p.hJohan Klokkhammer Helsing2016-07-181-1/+1
| | | | | | | | | | | | | | | Change-Id: I711536ea8c7ec167e531afe61e716e0081d2aab6 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Compositor: Rename shm to sharedMemoryJohan Klokkhammer Helsing2016-07-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | sharedMemory is much clearer and will increase the readability of the code and API. Change-Id: Ibb6d7424fa8d44a94a0f4ddf476a564eb235323f Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-3017-109/+91
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshellintegration.cpp Change-Id: I3e8666d0c2fd047f12daeb94b2c967c646576ed9