summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Be more careful when destroying wl_resourcesv5.4.0-rc1v5.4.0Giulio Camuffo2014-10-287-30/+17
| | | | | | | | | | | | | | | | | | | | | | | | The compositor must not destroy wl_resources when it wants to, else it breaks the contract with the client. Change-Id: Ic0d298072cdf0954d2504c04bff2bcc99733e621 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Update .gitignore after wayland examples moveOlivier Blin2014-10-231-13/+13
| | | | | | | | | | | | | | | Change-Id: I44e0dc6ac4e92a8bdc6a9f8398e60e4d323247f9 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| | * Gracefully fallback when xkb context creation failsOlivier Blin2014-10-231-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xkb context creation can fail when xkeyboard-config files are not available. This changes qwlkeyboard to gracefully fallback on the QT_NO_WAYLAND_XKB path, as suggested by Giulio Camuffo. Change-Id: Ic57d80b6aa3e9fbd8a393a3ca54dff768a4c3e83 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| | * Fix fd leak in case of ftruncate() failure in qwlkeyboardOlivier Blin2014-10-211-1/+3
| | | | | | | | | | | | | | | | | | Change-Id: Id7d6582d4e139763634c7022548b558d4a2f8ec2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Fix crash when cursor theme can not be loadedOlivier Blin2014-10-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add a debug message about theme loading failure. This is not necessarily fatal, some embedded applications could still function properly without a cursor. Change-Id: Ib3e2ee43b00630ee77997c7472a95ac5a22c2cc2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Fix -no-opengl buildsLaszlo Agocs2014-10-144-0/+8
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-41677 Change-Id: I039ec581e960eb70eb04aed6e65add70c563ba77 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Be compatible with older compositorsGiulio Camuffo2014-10-137-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | When binding globals take care of the version the compositor provides and don't call requests that the compositor doesn't implement. Change-Id: Iea0c534fb9e005720857e2778e380b6a9c22a6f3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Move examples into wayland subdirectory.v5.4.0-beta1Friedemann Kleint2014-10-0936-17/+19
| | | | | | | | | | | | | | | | | | Conforming to the Qt project directory structure. Change-Id: I452867fabc88e9594fa26f944b5d3e1ca4ffc720 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * Pass the relevant serial when setting the selectionGiulio Camuffo2014-10-092-2/+3
| | | | | | | | | | | | | | | | | | | | | This fixes copying in Weston. Change-Id: Icbdb81078e8df4575bbe440321773131ba27ebbf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Fix the compositor's wayland versioningGiulio Camuffo2014-10-0941-93/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot just assume all clients implement the same version of the various interfaces as the compositor does. Keep track of them, and react accordingly when creating a resource or sending an event. Change-Id: I9792433a14d49c5c4df0c892fc1349ce0dfb0d43 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Remove duplicate size property declarationMikko Levonmaa2014-10-061-1/+0
| | | | | | | | | | | | | | | | | | Change-Id: I9700c15066c030436dbe2f9a09b0851b7f4350ae Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Fix shm windows sometimes not showing after being hiddenGiulio Camuffo2014-10-063-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandShmBackingStore installs a frame callback on flush, and subsequent flushes will not attach a new buffer until the callback is fired. If the window is hidden while we're waiting for the callback, we attach a NULL buffer, so the compositor will not redraw the surface and will not fire the frame callback. When showing the window again the backing store's flush() will wait indefinitely for the frame callback to attach its buffer. To fix it destroy the frame callback when the window is hidden. This was easily noticeable when fast switching between popup menus. Change-Id: Ic0c71ed79e2fab9faf452f63b05bc4576ea9a3ba Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Call ::exit() from the gui thread onlyGiulio Camuffo2014-10-024-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | ::exit() is not thread safe, so make sure to not call it more than one time, once from the gui thread and once from the wayland event thread. Change-Id: I80905c6d996cb827a5101ae6d6c9bc12a267ba71 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Support the creation of >= 3.x OpenGL contextsGiulio Camuffo2014-09-306-119/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the EGL_KHR_create_context extension if available to create modern gl contexts. We disable window decorations on core profiles because that mandates a VAO to be used. Change-Id: Id6044e64f6736244ae9d593af4d68c4000a31de6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Send also repeat key release eventsGiulio Camuffo2014-09-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We were sending only key press events for the key autorepeat, going out of sync with the release events. Xorg sends both relase and press auto repeat events, do so here too. Change-Id: I41a9bfaff50afea779a7572220f6a01b507e95ac Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Use the screen resolution to determine whether a screen is portraitGiulio Camuffo2014-09-242-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using the screen physical size to determine if a screen is portrait or landscape, but we may not always get a valid size. Instead use the screen resolution. The orientation is then calculated in the wl_output.done handler, since we don't know the resolution yet when receiving the first wl_output.geometry event. Change-Id: I3554f916e54db829f49fa3d1ea24f7ce1ff24e7c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * decorations: Remove strange set dance between QWaylandWindow & ↵Robin Burchell2014-09-233-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandAbstractDecoration. This makes absolutely no sense. Just do things inline. Change-Id: Ic6d4e62bc9b3c0a4533f63740f2608a0be201047 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * QtWaylandClient: Pluginize window decorations.Robin Burchell2014-09-2313-403/+880
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to a D-pointer, split between abstract base class and an implementation. Also move implementation of the current built-in decoration to the "bradient" plugin, named in glorious memory of the programmer-designed blue gradient that will forever sear our eyeballs. The decoration plugin may be specified using the environment variable QT_WAYLAND_DECORATION. Change-Id: Idc99ab06ae138ad299bad2b62b9595379bd007ab Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Rename QWaylandDecoration => QWaylandAbstractDecorationRobin Burchell2014-09-2311-48/+47
| | | | | | | | | | | | | | | | | | | | | This is in preparation for decoration plugins. Change-Id: Idb322a7a5cbc2eb5bf2cce019073f9f4fb46297f Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | QWaylandInputDevice: Fix missing virtual destructor declarationLouai Al-Khanji2014-11-101-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | QWaylandInputDevice recently gained a virtual function, making it a polymorphic class. It should thus have a virtual destructor as well. Discovered through a GCC diagnostic: warning: deleting object of polymorphic class type 'QWaylandInputDevice' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] Change-Id: Ie816caabea56cde320768dcc8aba6b5ad50bf4c1 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Fix compiler warning about unused d variableLouai Al-Khanji2014-10-281-2/+0
| | | | | | | | | | Change-Id: Ia3ee8b13f1eacc435152149a1ee65fb62658506e Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Support for multiple input devicesMikko Levonmaa2014-10-2017-24/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the registration of multiple input devices for the compositor via private APIs. Since the Qt stack does not support separate input devices via the QPA, the identification of each device (wl_seat) is left up to the implementor. The compositor will identify input event via the QWaylandInputDevice::isOwner method. Usually this will happen when an item on the UI has received an event and would like to send it to the client surface. See QWaylandSurfaceItem for more details. Includes basic unit tests Change-Id: I7ee1db49388713bf3076c23cf8f8a165aefc2fe0 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Allow client side input device customizationMikko Levonmaa2014-10-0612-178/+654
| | | | | | | | | | | | | | | | | | | | | | Introduces QWaylandInputDeviceIntegration plugins to allow customization of input device related behavior. The plugin can be activated via the environment variable QT_WAYLAND_INPUTDEVICE_INTEGRATION Change-Id: If5629737752afacb29161f51c1b7c6e171fb2758 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-1982-387/+790
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwlcompositor.cpp Change-Id: Ica26e33eb2b77ed5be0e84e8f4256d2e85abfaf5
| * Add or remove popup grabber when the surface is mappedPier Luigi Fiorini2014-09-182-11/+16
| | | | | | | | | | | | | | | | When the surface is mapped add or remove the popup grab as expected. Change-Id: I807753393ef2753bc96c698f766523186ee88fd2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Don't send the wrong physical size to clientsGiulio Camuffo2014-09-182-2/+17
| | | | | | | | | | | | | | A 0x0 size means the compositor doesn't know what the real size is. Change-Id: I79cac0482839399d4a53e9556bb999592af555a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Ignore negative screen physical sizeGiulio Camuffo2014-09-171-1/+1
| | | | | | | | | | | | | | | | | | Weston can send in some cases a negative physical size in the wl_output.geometry event. While it is not clear whether that is legal go the extra mile and catch it. Change-Id: Ie2fbab84e653ad77732a72b6ca61509eb7849895 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix retrieving the selection/dnd dataGiulio Camuffo2014-09-152-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Installing a roudtrip on the custom event queue in the wl_data_offer.offer handler is broken because that triggers a wl_data_device.selection event, which emits the QClipboard changed signal, so code listening to it may end up trying to retrieve the clipboard data before the roundtrip ends. Additionally, we're calling wl_data_offer.receive for each mime type, even if then we never read from the fd, making the source client do work for no reason. Instead, call wl_data_offer.receive retrieveData_sys, that is when actually retreiving the data. We don't need to install a roundtrip after that, just flushing out the requests is enough, because we wait up to one second for the source client to write into the fd. Change-Id: I180779e375ebd5a22af7084458505a41107fab19 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Don't give bogus values for a screen physical sizeGiulio Camuffo2014-09-151-1/+4
| | | | | | | | | | | | | | | | If we don't have a valid physical size for a screen, i.e. (0x0), return the default value from the base class. Change-Id: Ia7b6f90ee73e07014ab752ceb165426812c49415 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * The QWindowSystemInterface API changed, make it build againGiulio Camuffo2014-09-151-2/+1
| | | | | | | | | | Change-Id: Ic00a820ebac7727a8d71d62ce191fe29de52aac0 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * InputMethod: fix minor typo in debug logOlivier Blin2014-09-091-4/+2
| | | | | | | | | | | | | | | | This also adds parenthesis for clarity, and uses the qDebug() function instead of the stream, as suggested by Andrew Knight. Change-Id: I1dc3060d516645345c1df5909c377f611502d2fb Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fix QWaylandScreen geometry and physical sizeGiulio Camuffo2014-09-085-17/+34
| | | | | | | | | | | | | | | | | | | | | | The wl_output.geometry event carries the physical size of the output, not the logical one. This happened to work only because the geometry event was sent before the mode event, which carries the logical size. Moreover, use the done event to send only one geometry change event instead of one per advertized mode. Change-Id: I5b09d56654aac149d90692bb5a3e050cc0d60cb6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Silence warnings about keyboard grab and size hint propagationLaszlo Agocs2014-09-081-0/+3
| | | | | | | | | | | | | | | | | | | | These two unimplemented functions often result in showing warnings from the default implementations. This is not quite ideal since the warning is useless for users and pollutes the standard output (which f.ex. Creator captures as-is) Change-Id: Ic05ff1590ed351738f0390a94ed5203a05664d4a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Avoid useless handleTouchEvent callLaszlo Agocs2014-09-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | The call when allReleased is true is a historical artifact: Originally the call was necessary to generate a TouchEnd. Later the determination of the event type got moved to QWindowSystemInterface. As a result the call is completely superfluous since it will bail out immediately. Task-number: QTBUG-36473 Change-Id: If1a270445a620e6f795912873c60fb1a05384964 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Allow activating decoration buttons with touchv5.4.0-alpha1Laszlo Agocs2014-09-062-6/+19
| | | | | | | | | | | | Task-number: QTBUG-41142 Change-Id: Ifad600d375d3b5ba197c384ece54a93db9aa0d2d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Fix window decorations for GL appsLaszlo Agocs2014-09-065-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | You cannot have rounded corners with an alpha-less config. To make OpenGL applications appearing with the correct decoration, alpha must be enabled. With this fix the OpenGL apps' decoration will now look identical to the SHM apps'. Change-Id: I24431ddab63146f7f697c85277f00f41e5c55e85 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Advertise new screens created after startupGiulio Camuffo2014-09-063-4/+5
| | | | | | | | | | Change-Id: I995f49e52ec888830b478f1e1f9cc82132776725 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Avoid unused parameterLaszlo Agocs2014-09-051-0/+1
| | | | | | | | | | Change-Id: Icfc7e4e2d6cd030fc0509ad4724b577f88c4e850 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fix warning from qmake in the compositor headersLaszlo Agocs2014-09-051-1/+1
| | | | | | | | | | | | Change-Id: I3a23a8af2f3e7f5ac5f1fcabc8e678de39558f61 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * DataOffer not invalidated when client loses keyboard focusLi Qiu2014-09-045-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The data_offer object should be invalidated when client loses keyboard focus. Otherwise in following scenario, it will become zombie object: start app1 -> copy text -> start app2 -> paste text -> close app1 -> paste again in app2 -> seg fault in qtwayland. The root cause is that when app2 takes focus the first time, data_device.data_offer event was sent to it from DataDevice::setFocus. When app1 is closed, the data source reference in data offer becomes invalid. so when trying to paste again in app2, segmentation faults Change-Id: I16a584e80fddaadd269b00cdf39eb405dd95b622 Task-number: QTBUG-41005 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Destroy the QScreen when its wl_output is removedGiulio Camuffo2014-09-045-4/+18
| | | | | | | | | | | | Change-Id: I4532d05cca44c88fe38c14eacbe90c190f272b2c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix crash of test clientLi Qiu2014-09-044-0/+60
| | | | | | | | | | | | | | No wl_data_device_manager created in Mock compositor Change-Id: If80f71165c28678f296bc18f0fea572dcb1a2f77 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Wayland: can drag a window by its titlebar using the touchscreenShawn Rutledge2014-09-015-2/+32
| | | | | | | | | | | | | | | | It was already possible to drag it via the mouse but not via touch. Task-number: QTBUG-41085 Change-Id: Ia52c7124fb2f1aa0331897bd072fcf09fb78aa1a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Wayland: correct touch locationShawn Rutledge2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | The window margins were offsetting the touch point in the wrong direction. Task-number: QTBUG-36602 Change-Id: Id8b31d2de4051f36d3ff4e088bbc9bd7cc84ca13 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix touch with WestonLaszlo Agocs2014-09-011-7/+19
| | | | | | | | | | | | | | | | | | Work around the missing touch_frame after the last touch_up. Task-number: QTBUG-36602 Change-Id: Iccb03bdc8b430c7cefc097c3c84e50be676c7fe7 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * qwindow-compositor: Rename QOpenGLWindowLaszlo Agocs2014-08-296-21/+22
| | | | | | | | | | | | | | That's a public class in Qt 5.4. Use the more appropriate CompositorWindow. Change-Id: Id7de20c7e2d5b373f8ef9fe9a836188dc864479e Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Warn when EGLContext could not be created.Gunnar Sletta2014-08-291-0/+4
| | | | | | | | | | Change-Id: Id840ace3d762e47c0076745301e8012755077770 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * build: If building the compositor API, build plugins after the compositor ↵Robin Burchell2014-08-271-0/+1
| | | | | | | | | | | | | | | | | | library. Some plugins require the compositor library, so it must be finished first. Change-Id: I60d2932cdd0e777a0ad0dd866246c59b9a1f47fc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Remove the unused context parameter from lock/unlockLaszlo Agocs2014-08-264-8/+8
| | | | | | | | | | | | | | Nothing relies on it and we are anyway passing null. Change-Id: I2543650441c7f97d23b52bc7a4caa555b0777676 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Returns false for window decoration support in xcomposite and brcmLaszlo Agocs2014-08-253-0/+3
| | | | | | | | | | Change-Id: Ibc8eae85219da044812d22967c46b4bebb5e27bf Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>