summaryrefslogtreecommitdiffstats
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
...
* | Use by-ref in foreach where T is non-trivialSergio Martins2015-07-041-1/+1
| | | | | | | | | | Change-Id: Iac40929aebc1e0f507b729b0c01a2ccb18516c37 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-297-8/+35
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic75157b11eee188608c3ac7ed6fb1a033bb72750
| * Fix input devices leak in clientOlivier Blin2015-06-121-0/+3
| | | | | | | | | | Change-Id: I28200698706168308e450b2cd3cfa99df517f9b7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix typo that leads to mis-evaluation of an expression.Christian Kandeler2015-06-091-1/+1
| | | | | | | | | | Change-Id: I5d6eedeb3dfb80ca9df7ca27e29ad6604dbfe683 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix wheel events when the decorations are enabledGiulio Camuffo2015-06-093-5/+29
| | | | | | | | | | | | | | | | | | We must offset the wheel events' position, as we do with the other types of mouse events. Change-Id: If85e93ffe95304c7dee4c2a3ff195a73243a8182 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix a corner case freed memory use/crashGiulio Camuffo2015-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | QWaylandDisplay::flushRequests() does not only flush them, but also dispatches the pending events. If we have two wl_data_device.selection events in the queue we must not dispatch the second one while we are dealing with the first one because that will replace the data offer and delete us while we're in QWaylandMimeData::retrieveData_sys(). Change-Id: Ib58ca571867faa2633daa9ec94fe7094df02e9fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Don't generate spurious selection eventsGiulio Camuffo2015-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | By calling destroy() on the active wl_data_source before replacing it with a new one and calling set_selection() we trigger a spurious selection(null) event before the one with the offer for the source we are going to set. Change-Id: I6c2f2fd029fa523312b9892c6a5050805dfa83b0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Add 3 QList::reserve() callsSergio Martins2015-06-081-1/+3
| | | | | | | | | | Change-Id: Ic89d25a4497ffaffb3f6b688f4c5ecc5128e9642 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-037-10/+53
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwloutput.cpp Change-Id: I05f7431aca46760f90632dfa7ef9c4d0abf392ec
| * Fix that we pick up the generated headers in source packagesJørgen Lind2015-05-291-0/+2
| | | | | | | | | | Change-Id: If5ae8749ccbddfc878ae4e0adaa40f072527d425 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix crash when the wl_shm global comes after a wl_output oneGiulio Camuffo2015-05-283-1/+8
| | | | | | | | | | | | | | Task-number: QTBUG-44503 Change-Id: I6932df57bb4560b6dceb72a5cb7c536cd090e92a Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Add safety check in QWaylandInputDevice::Keyboard::modifiers()Martin Gräßlin2015-05-151-0/+3
| | | | | | | | | | | | | | | | ::modifiers() might be invoked before being initialised. E.g. when a pointer button event is emitted before the keymap is sent. Change-Id: Ib95f9866d808b2a32ddfaa0862cdb3226fab1938 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Track last input window with a QPointer in case it is destroyedArnaud Vrac2015-05-072-2/+8
| | | | | | | | | | Change-Id: I61d7aa4b6a37922eb3beefd983154ee267cae0ef Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Map more XKB key codesArnaud Vrac2015-05-071-0/+17
| | | | | | | | | | Change-Id: I0a2b56043235666bc57b46ae4ac78ca5e24e736d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Fix crash on keyboard removeGiulio Camuffo2015-05-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | If the compositor sent a wl_keyboard.leave and a new wl_seat.capabilities without the keyboard bit we would end up deleting the Keyboard object with a roundtrip in flight, ending up using freed memory later. Destroy the callback when destroying the keyboard, and notify the window system the active window is active no more. Change-Id: Ie415ca62b46e0b8ef0fe4d09c8e7a8130928df90 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Use a FontSmoothingGamma value of 1.0Giulio Camuffo2015-04-241-0/+7
| | | | | | | | | | | | | | This is what the xcb plugin does, be consistent with it. Change-Id: I5befa2de3ff514ca0c9196eb7137682586cec126 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Use defines instead of hardcoded stringsGiulio Camuffo2015-04-241-6/+4
| | | | | | | | | | | | Change-Id: Id382a1e39f2c052fbfeb96caa9b01becb31e81c9 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Do not manually update the xkb stateGiulio Camuffo2015-04-241-1/+0
| | | | | | | | | | | | | | | | | | xkb_state_update_key() is not supposed to be used in apps with a master process, such as wayland clients, which use xkb_state_update_mask() with the state serialized by the master. Change-Id: Ie51a39ca0c567c54072b221d1ab8cf7b8ea15c55 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Remove output extensionPier Luigi Fiorini2015-05-067-143/+0
|/ | | | | | | This protocol is empty now and is no longer used. Change-Id: I45e79fb86a67b4cebdc307170218fa039b2aa27f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Add client side support for media keysGiulio Camuffo2015-04-161-0/+7
| | | | | | | | | | Unfortunately we don't have a keysym in libxkbcommon for PlayPause, we only have Play. We're going to pretend XKB_KEY_XF86AudioPlay is really PlayPause since that is what is most common. Change-Id: I1a75d8b5b0ea360e0f62eb7a93004ba3fababfa8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-157-18/+43
|\ | | | | | | | | | | | | | | Conflicts: src/client/qwaylandshmbackingstore.cpp src/client/qwaylandwindow.cpp Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
| * Remove .desktop suffix to appIdPier Luigi Fiorini2015-04-101-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The appId is the desktop entry identifier. According to the desktop entry specifications [1], for applications the part of the name should follow the reverse DNS convention (see [2]). To do this we use the application domain if available, otherwise for lack of information we fall back to the executable base name like other toolkits such as Gtk+ do. [1] http://standards.freedesktop.org/desktop-entry-spec/latest/ [2] http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html Change-Id: I181ad23a9736844e07e8060d78e756a943c27f67 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Don't handle mouse events in decos if buttons were pressed in the content areaGiulio Camuffo2015-04-081-1/+2
| | | | | | | | | | | | | | | | This fixes the decorations stealing the mouse events when going outside the content area. Change-Id: I8f3592fbda6b9c1da6498d74820a73be11c6999d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Drop unused mScreensInitialized variable in QWaylandDisplayOlivier Blin2015-03-291-1/+0
| | | | | | | | | | | | | | | | | | Unused since commit 78a701272e68d4f0ab95df4062374b8d34ef2919: Made wayland plugin single-threaded, yay :) Change-Id: I1fae78d77179feaac79f5dba6dcad8084e3e97fa Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Fix shm buffers init and destruction on failureOlivier Blin2015-03-272-5/+12
| | | | | | | | | | | | | | | | | | | | Some pointers need to be initialized in QWaylandBuffer and QWaylandShmBuffer, and checked at destruction. This avoids crashes when shm surface creation fails. Change-Id: I6f6afa3cc6c67533b5130700cbc27b271764109e Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Make QWaylandShellSurface a QObject to allow build without RTTIOlivier Blin2015-03-274-7/+11
| | | | | | | | | | | | | | | | | | | | | | dynamic_cast can not be used when RTTI is disabled, so make QWaylandShellSurface a QObject. QWaylandWlShellSurface and QWaylandXdgSurface must also inherit from QWaylandShellSurface first, to properly inherit from QObject. Change-Id: I2addb8105a0fe61615d4bc905414f7ee7277029f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Disable -Wcast-qual in qtwaylandv5.5.0-alpha1Thiago Macieira2015-03-101-0/+3
| | | | | | | | | | | | | | | | | | We have a lot of generated C source code that needs to do casting and C doesn't have const_cast, so the -Wcast-qual option produces a lot of noise. Let's make sure it isn't enabled in qmake.conf or qt_common.prf. Change-Id: Iee8cbc07c4434ce9b560ffff13c9635861a8eca9 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-201-2/+9
|\| | | | | | | Change-Id: I03fd08fc0576ffac813f64905c23de4d65e67433
| * Run eventDispatcher in QWaylandDisplay::forceRoundTripMartin Gräßlin2015-02-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the application uses QCoreApplication::setEventDispatcher before the QGuiApplication is created the blocking roundtrip might block the application indefinitely. This can happen if the application starts a Wayland server in the same process before the QGuiApplication is created. And the QtWayland plugin connects to this server. In this case a roundtrip blocks as the Wayland server cannot process the events the QWaylandDisplay is waiting for. By running the event dispatcher manually and using the pending variant for dispatching the Wayland event queue, the application can be kept alive. Change-Id: I9c36fccbae8921e1ae9a0a8b7f460520b1b65d5c Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Update copyright headersJani Heikkinen2015-02-1786-1819/+1163
| | | | | | | | | | | | | | | | | | 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. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* | Fix buildGiulio Camuffo2015-02-171-0/+2
| | | | | | | | | | Change-Id: I790e9bfbcffc7458e2a46f2da32dcbde0c6bffe8 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Add a integration hook to get the wayland queue used by the QPA pluginGiulio Camuffo2015-02-161-0/+2
| | | | | | | | | | | | | | This comes handy for clients directly using raw wayland objects. Change-Id: Ie526ac7b25a6c6a34ce61699103e612616bffbb8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-1611-31/+91
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddataoffer.cpp src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurfaceitem.cpp Change-Id: I2eae0fd43a71fbfd7c907ca715707a26f3c134c5
| * Sanitize popup behavior.Laszlo Agocs2015-02-136-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Popups are pretty important for widget apps. Menus, combobox dropdows and such are all popups. Currently they are completely borked when activated via keyboard or touch. This is because of the bizarre set_popup request in the protocol, and Weston's current implementation, that ignore the fact that a popup can be opened as a result of a keyboard event too or may not originate from an input event at all. Pass the last input device and serial we have seen, regardless of the type, by tracking it globally in the QWaylandDisplay. With this patch menus and such will not freeze the application anymore when activated with keyboard or touch without sending a mouse event to the window first. The behavior is still broken in some ways, especially with keyboard due to immediately getting a popup_done, but at least applications remain usable. Task-number: QTBUG-41142 Task-number: QTBUG-41147 Change-Id: I18de501004ae8a62ff8667e72225d08c2d3ba491 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Fix popup menus with no parent windowsGiulio Camuffo2015-02-111-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMenu API doesn't play well with Wayland. You can do: QMenu menu; menu.popup(someGlobalPos); which is completely broken on wayland. If some popup window doesn't have a transient parent use the current focus window for that. Fixes right-click popups in qdbusviewer and other apps. Change-Id: I3227f4ec27431ca8ec156971cbfdbf1e848a0527 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix copying text to non-qt clientsGiulio Camuffo2015-02-072-0/+5
| | | | | | | | | | | | | | | | | | Like we do for pasting, set the mime type of text to "text/plain;charset=utf-8" too besides "text/plain". This allows copying text to clients such as weston example clients or Xwayland. Change-Id: I8a24f32d93e438f16db662e7c09b09ddd7578768 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Do not send invisible key charactersGiulio Camuffo2015-02-051-1/+2
| | | | | | | | | | | | | | | | | | xkb_keysym_to_utf32() will return 0 if the keysym does not have a unicode representation. Task-number: QTBUG-44012 Change-Id: I85a13b58c7f0b9765c7d67db6568a90629bcfbfa Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Fix deadlock when starting a dragGiulio Camuffo2015-02-051-1/+8
| | | | | | | | | | | | Change-Id: Ie2fdc56bffb97ce04ffad11ea7a7686dc09a06cc Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Make all the screens virtual siblingsGiulio Camuffo2015-02-022-0/+9
| | | | | | | | | | | | | | | | Wayland outputs fit the definition of virtual sibling screens so make the platform screen subclass so. Change-Id: Id3f2592653f6309406185589f70127f2b74065ac Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Send mouse events with the correct modifiersGiulio Camuffo2015-01-291-5/+5
| | | | | | | | | | Change-Id: I33da2681bc2315b3dc7de16fa80c45e26a478caa Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fix pasting from sources advertising the utf8 charsetGiulio Camuffo2015-01-291-4/+21
| | | | | | | | | | | | | | | | | | Some clients use "text/plain;charset=utf8" as the mimetype for the clipboard instead of just "text/plain". Since we support Utf8 accept it as a valid type. Change-Id: Icd540f0ff507ed9917b374f3b40fbdc259ce9ee2 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Make sure we send a valid initial resizeGiulio Camuffo2015-01-271-2/+2
| | | | | | | | | | Change-Id: Ib9a0152f83af433354d32ef4a8a233e5551ded8c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Add a SHM format converter classJorgen Lind2015-02-051-1/+5
| | | | | | | | | | | | | | | | | | This class helps keeing one lookuptable for server and client It relies on that wayland-(client|server)-protocol.h being included before the qwaylandshmformathelper.h Change-Id: I12158126a80c8fef5c52427d35792f33716020f1 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Update the protocol to 1.4 and raise the required libwayland versionGiulio Camuffo2015-02-032-4/+15
| | | | | | | | | | | | | | | | Wayland 1.4 introduces wl_subsurface which is quite an important addition. Change-Id: I48375f60adce556c9989872319f4d073e4a7b13b Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Namespace the platform pluginsGiulio Camuffo2015-01-2985-20/+372
| | | | | | | | | | | | | | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-195-6/+18
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I65c8503cf632699129ebb6b4f01721b74be78def
| * Set the composing string of the wayland input methodGiulio Camuffo2015-01-132-0/+17
| | | | | | | | | | | | Task-number: QTBUG-43346 Change-Id: I9bc6d804ddca59a7a0173b8f0d3ec2f268fe9a59 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Remove unused membersThiago Macieira2014-12-313-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang found two problems with this from QWaylandDataDeviceManager. First, it's a class, not a struct. Second, nothing is using this private member. qwaylanddatadevicemanager_p.h:66:5: warning: struct 'wl_data_device_manager' was previously declared as a class [-Wmismatched-tags] qwaylanddatadevicemanager_p.h:66:36: warning: private field 'm_data_device_manager' is not used [-Wunused-private-field] And also this one: qwaylandextendedoutput_p.h:61:21: warning: private field 'm_screen' is not used [-Wunused-private-field] Change-Id: Ifc8f28f92190547dcb0a5319aa6fc14277894f15 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Send proper mouse enter eventsGiulio Camuffo2015-01-134-50/+92
| | | | | | | | | | | | | | | | The wl_pointer.event carries the surface local position of the pointer. Notify Qt of it, without pretending it to be a motion event. Change-Id: Ibbe1d125a93b478f9c350a50bfea25b01f628178 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Allow retrieving the egl display for a QWindow on waylandGiulio Camuffo2015-01-051-0/+2
| | | | | | | | | | | | | | | | This allows a compositor running with the wayland qpa inside another compositor to provide EGL to its clients. Change-Id: I308fb909c8168955148be152bf314a53c0e5ca43 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>