summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix shadow build problemAndy Nichols2013-02-131-1/+1
| | | | | | | | wayland_common static library was referenced wrong when shadow building. Change-Id: I7af15027de81d7f2d0733d107d369bc82658a59d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add wayland_common static lib to PRE_TARGETDEPSAndy Nichols2013-02-131-2/+3
| | | | | | | | | | | | | Previously, if a change was made to libwayland_common.a after the first build, the platform plugins were not re-linked against the new library. By adding the library to the PRE_TARGETDEPS of the platform plugins, this assures that if the wayland_common library changes, the plugin gets relinked. Change-Id: Ia8b3e9c5d92c9ed21bba196897f6b9fa70b6f889 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Call handleScreenGeometryChange when QWaylandScreen::setGeometryElvis Lee2013-02-081-0/+4
| | | | | | | | If geometry of QScreen is not updated, QApplication::topLevelAt() cannot find proper screen. Change-Id: I481dbeaa779a64ddb04d2bb5c247af4f9eb71d98 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Qt-ify the QtCompositor moduleAndy Nichols2013-02-08164-794/+1314
| | | | | | | | | | | | | | | | | | | | Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QtCompositor hardware integrations as pluginsAndy Nichols2013-02-0641-124/+726
| | | | | | | | | | | | | | | | | | | | | | | Rather than defining which hardware integration should be used at compile time, we should build each hardware integration as a plugin, and load the one we want at runtime. The default hardware integration is wayland-egl, but you are able to override this using the environment variable QT_WAYLAND_HARDWARE_INTEGRATION Backends tested: wayland-egl xcomposite-egl Backends untested: xcomposite-glx brcm-egl Change-Id: Idee66574d232a9236898f68ca64145f471b1bb80 Reviewed-by: Andy Nichols <andy.nichols@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Overhaul how platform plugins are builtAndy Nichols2013-02-06126-1843/+454
| | | | | | | | | | Instead of building only one platform plugin through the use of a complicated if/else structure, build a plugin for each available hardware integration type. Change-Id: If133576515a881274019c1ac5956605f27a9fc40 Reviewed-by: Andy Nichols <andy.nichols@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Don't build QtCompositor unless explicitly enabledAndy Nichols2013-02-051-1/+5
| | | | | | | | | | | | | The QtCompositor API is to be considered experimental in Qt 5.1 and thus it should be disabled from being built by default. If the qmake variable CONFIG contains "wayland-compositor" then the QtCompositor API will be built. Change-Id: If10f5a688749f31338a80be45bbec22a0f2d12da Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix scroll wheel behavior for Wayland clientsAndy Nichols2013-01-312-5/+17
| | | | | | | | | | | | | | | | | | | | There are inconsistencies between how we represent mouse wheel deltas and how the Weston compositor does. For better compatibility with Weston we need to change our mouse axis events too look like Up: positive Y (+10) Down: negative Y (-10) Left: positive X (+10) Right: negative X (-10) Our synthesised mouse wheel deltas are (+ or -)120 with both axes inversed. With this change Qt Clients should behave the same way on both Weston and QtCompositors. Change-Id: I37b4fd8cbb93e5a1a135a60ae8c3547c823aeba2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Cleanup for Wayland client cursorsAndy Nichols2013-01-302-158/+201
| | | | | | | | | The previous code was a blob of C code copied from the Weston project. There is now a map containing most of the relevant xcursors names needed by the Wayland cursor API, and now we lazily load the cursors we need. Change-Id: Id4b37ab2b6360d13f6fb8ce7da791ea9baf15c57 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Disable desktop settings awareness for nowAndy Nichols2013-01-291-0/+2
| | | | | | | | | | | | | | | | Loading the KDE and Gnome settings for Wayland clients don't yet make sense. For the platform theme we check to see whether we are in a KDE or Gnome environment, then set the default style hints based on that. Right now for the Wayland platform, it makes more sense to use the generic UNIX platform theme. If there are ever KDE or Gnome Wayland environments available, it may be worth reconsidering, but for now it just causes problems(like the GTK+ style being loaded even though it has X11 dependencies). Change-Id: I13017c46f47ae34df884d2070a239c16ffbee850 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* fix build error when QT_COMPOSITOR_WAYLAND_GL is not defined.Elvis Lee2013-01-291-0/+1
| | | | | | Change-Id: Ic654faaa97e1929fcbc7f80e4338c74df831e23d Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix crash when unsetting cursorAndy Nichols2013-01-291-1/+2
| | | | | | | | cursor pointer is null when we unset, so we must check for this. Change-Id: Ib0b0dae8e98d7f3b3f7e2a1d2037d3d4981027f4 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Fix the pointer cursor handling (QtCompositor side)Andy Nichols2013-01-189-48/+49
| | | | | | | | | | | | | | | | | | | We now use the wayland-cursor library for handling pointer cursors. This required some API changes in QtCompositor, as cursors are now represented by wl_surfaces instead of just wl_buffer data. This means that when a new cursor is set by a client, you will receive a surface which you can generate cursors from. This Surface will be painted to when the cursor is changed. This also means that not all WaylandSurfaces are window surfaces, so it's important that you check that a WaylandSurface has a shell surface before treating it like a window surface. An API has been added for checking if there is a shellSurface available in a WaylandSurface. The qwindow compositor example demonstrates the correct usage of these new API's. Change-Id: Ife6b417f1048fd926a3499a139de07bceaebc727 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Fix the pointer cursor handling.Giulio Camuffo2013-01-187-146/+182
| | | | | Change-Id: I23527bf06b88c8f612f9bfe7d48f61e80aa6bec3 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix build error in non wayland-egl backendsAndy Nichols2013-01-166-6/+6
| | | | | | | Change-Id: I7db31679d2fbc7f053e9eca53fdf2593dfe33f89 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Draw window iconPier Luigi Fiorini2013-01-153-2/+35
| | | | | | | Draw window icon to the left of the title. Change-Id: I35921a8f9326d04e8601336d318fb8ec9a2c2b4e Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Default to Qt::ArrowCursor when cursor = 0 in changeCursor().Friedemann Kleint2013-01-151-6/+7
| | | | | | | | | | | The planned fix for the task introduces passing cursor = 0 meaning "no cursor set" for the window in question. Prevent it from crashing by defaulting to Qt::ArrowCursor. Task-number: QTBUG-28879 Change-Id: I3233c79d41ccf96cee237d93624b3ea740b7e772 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Implemented moving and resizing using the decorations.Giulio Camuffo2013-01-1012-30/+110
| | | | | Change-Id: I4153b72876b272c508264c82ac10def68ee4349d Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Draw decorations using colors from QPalette.Pier Luigi Fiorini2013-01-102-8/+27
| | | | | | | | | Use colors from QPalette to draw the client-side decorations. Also, draw using a linear gradient which makes the title bar look three-dimensional. Change-Id: Ib34ebc354f4c7556051a6164323fe178be13fe27 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Client-side decoration actions.Pier Luigi Fiorini2013-01-104-4/+114
| | | | | | | | | | | Add close, maximize and minimize buttons to the title bar. However the minimize button is not yet implement, it seems missing from the wl_shell_surface API. Task-number: QTBUG-27465 Change-Id: Id683f069cf5b329f827af87f457cfd81a5c6e6a1 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Fix issue where hidden menus were never shown againAndy Nichols2013-01-101-1/+1
| | | | | | | | | | | | When we tried to make a QMenu visible that had already been visible before, we were getting stuck waiting for a frame callback that we never requested. We now check for this case in QWaylandShmBackingStore::beginPaint Task-number: QTBUG-29021 Change-Id: I5334aa677ba36d801e9a96938cc5924856dcdcc3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Title don't cover buttons.Pier Luigi Fiorini2013-01-101-1/+9
| | | | | | | Avoid covering the action buttons with the title. Change-Id: Iff6696a8a9eca2804e7ff3a0e778675fb538d8da Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-081-1/+1
| | | | | | Change-Id: I7cd0b3e1ac9f326b249bc8ed2ca5abf522cc619a Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
* Fix menus so they do not disappear instantlyAndy Nichols2013-01-071-1/+0
| | | | | | | | | | We should not call handleWindowActivated(0) as a result of QWaylandInputDevice::keyboard_leave Task-number: QTBUG-27464 Change-Id: Ic59a051bc6403aa0c43a9525a4d09661065d177a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove WAYLAND_CLIENT_THREAD_AFFINITY logicAndy Nichols2013-01-072-10/+0
| | | | | | | | | This was a define added by a wayland patch that was not accepted upstream. This should no longer be needed, and the patch has been removed from our codebase. Change-Id: I6c823a5e9771ea29c640d27fd2de2a42982ed7b8 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Set surface class name.Pier Luigi Fiorini2013-01-048-2/+37
| | | | | | | | | | | | | | | The class name identifies the general class of applications to which the surface belongs. The class is the name of the desktop file and is derived from the process name. We might want to add a new method to QWindow in order to set a custom class name. It's quiet similar to WM_CLASS on X11, for more information see https://live.gnome.org/GnomeShell/ApplicationBased Change-Id: I5be90fb45e82e79710dda376f42c18c126d2a80f Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Cleaned out usages of removed or to be removed APIs.Samuel Rødal2012-12-0611-86/+6
| | | | | Change-Id: Iabbada23d010ac0fdf99f88af3f109f94814b5ea Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Cleanup QtWayland moduleAndy Nichols2012-12-0330-1908/+552
| | | | | | | | | | | | | | | | | | | | | | | Now that both xkbcommon 0.2.0 and libWayland 1.0.0 have been released, we should no longer be building against sha1's and should be preparing for an eventual release so these build hints have been removed. A test has been added for libWayland 1.0.0 which is required to build QtWayland. README has been updated to reflect the current situation src/3rdparty has been removed as it has not been used in some time. patches folder and contents have been removed as they are no longer needed. extensions folder has been moved to the src folder Change-Id: Iab79b5c164758a4bd0253c90f60b2a2d044e2785 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change setPos -> setPosition in WaylandSurfaceItem.David Yip2012-12-031-1/+1
| | | | | Change-Id: Ib6b5ed3062d8bc962d21398ccfb7f61c5d21a548 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure the GL integrations have been fully initialized in time.Samuel Rødal2012-11-304-0/+7
| | | | | | | | | | Before we return from the platform integration constructor, and thus before the application tries to create QPlatformWindows or QPlatformOpenGLContexts. Change-Id: Iface9116f876e2d25561be4fcaee5fd7dabba572 Reviewed-by: Florian Hänel <florian.haenel@basyskom.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Initial implementation of decorations for EGL windows.Giulio Camuffo2012-11-1718-71/+559
| | | | | | Change-Id: I7521e583bf18f3690ecc6baacd05a5e92e9fd890 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Port to libxkbcommon 0.2.0.Giulio Camuffo2012-11-051-4/+4
| | | | | Change-Id: If2b76317c5c5addcbc45c0b3212cd2ce72ceab9c Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Update QtCompositor API to use wayland 1.0.0Andy Nichols2012-11-043-7/+25
| | | | | Change-Id: I6b598595cdb8ff91d5146e0ae2511752bcfa473f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Port the Wayland QPA plugin to wayland 1.0.0.Giulio Camuffo2012-11-0421-60/+101
| | | | | Change-Id: I5b2092ed9dac8201c7a681acea0a3d703423c743 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* adjust to qt_plugin.prf changesOswald Buddenhagen2012-10-241-5/+2
| | | | | | | | DESTDIR and INSTALLS+=target are set up automatically now, but PLUGIN_TYPE needs to be defined. Change-Id: I82a97498be26a6e9021deb6fff02a21bd4787851 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Prevent leaking texture ids.Samuel Rødal2012-10-242-4/+16
| | | | | | | | | We need to call glDeleteTextures() in the correct thread (and when the correct context is current). Luckily, QOpenGLSharedResourceGuard is designed to solve that problem. Change-Id: Ifc04fb9040ef82947189b098e1e1c4c8d787551f Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Follow API change for QPlatformWindow::setWindowStateRichard Moe Gustavsen2012-10-182-6/+2
| | | | | | | | Follow change introduced in d6588d2 Change-Id: I1040e973612edced105163c2af06d165a0c27d51 Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Follow API change for QPlatformWindow::setWindowFlagsThomas Senyk2012-10-162-4/+3
| | | | | Change-Id: I442a592d0833a82594e55213a10308243324012c Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fixing include warnings regarding QWindowSystemInterfaceThomas Senyk2012-10-1611-11/+11
| | | | | Change-Id: Ie8df028fed311e8938ed8d25552e11dc8ff9261a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Changing from QQuickCanvas to QQuickWindowThomas Senyk2012-10-161-6/+6
| | | | | | | Following Change Id34e2954 Change-Id: Ic0d0e860c954570408c39a8f0d9502183c624dd4 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* change the order of subdirsElvis Lee2012-10-081-1/+1
| | | | | | | | | | | Commit '272142f53790987b3f226ca70f942da927d99815' makes wayland.pro need qt_compositor.pri file for DESTDIR. But qt_compositor.pri is made by compositor.pro. So '/compsitor' must be compiled before '/plugins'. Change-Id: Iae993195e399ff1a66c438cd450355fc5d35935b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Compile after QWindowSystemInterface API changes.Morten Johan Sorvig2012-09-282-7/+11
| | | | | | Change-Id: I71024a4f36d4952c70b3dc3caa2156e2e7c9b837 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-25166-2679/+2925
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie65cbe0c622780d2f0672bce19d267d1167620ff Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Fixed modifiers not working for non-Qt wayland clients.Samuel Rødal2012-09-222-1/+52
| | | | | | | The compositor needs to keep track of the modifiers now. Change-Id: Idc865744e1fdc05ced276ad766b2ce095fb207f5 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Made qtwayland compositor handle plain wayland clients.Samuel Rødal2012-09-223-0/+96
| | | | | | | | | | | | Wayland clients now expect to receive a compiled xkb keymap from the compositor. Update libxkbcommon_sha1.txt to newest and send a keymap to the clients (for now just evdev/pc105/us). Change-Id: I89e99f05d8a98a7de83b8985a370de4fa39074a6 Reviewed-by: Arvid Picciani <aep@exys.org> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Prevent crashing the compositor when the client wants to unset the cursor.Samuel Rødal2012-09-221-1/+3
| | | | | Change-Id: I40460110e24555aacaef928af32372c32a3291d1 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* m_windowManagerListener is unused variableElvis Lee2012-09-121-2/+0
| | | | | | | There is already a variable named "windowmanager_listener" Change-Id: I40bfb42a5b0b35d0d8851f0baa6f3741b47ae57e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* use wl_list_for_each_safe instead of wl_list_for_eachElvis Lee2012-09-121-2/+2
| | | | | | | | frame_callback may has invalid value if it's freed heap area is overwritten after wl_resource_destroy Change-Id: I61d6484857624e9c379ec96e85903e86b55531e0 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-112-3/+0
| | | | | Change-Id: I229c0704fc3a5d230c921b8f9a08ad1b8ee124f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix build errors due to api changes in QtBaseJorgen Lind2012-09-101-1/+1
| | | | | Change-Id: Ie171d9342d877792c2f0b19694ff020965d91985 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>