summaryrefslogtreecommitdiff
path: root/libweston-desktop
Commit message (Collapse)AuthorAgeFilesLines
* libweston-desktop: implement the new xdg_shell (stable) protocolant8me2019-02-154-1/+1494
| | | | | | | | | | | | | | | | | | | | | | Some clients like the mpv video player now request the xdg_shell protocol so these will fail if the compositor only provides the xdg_shell_unstable_v6 protocol. Compositors like mir and gnome provide both protocols. The two protocols are very similar therefore the code in xdg-shell-v6.c has been refactored to work with the new xdg_shell protocol and now resides in xdg-shell.c. Pekka: - split the patch - fix continued line alignment Daniel - allow anchor_rect to initially have zero dimensions - account for get_popup allowing NULL parent surface Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Daniel Stone <daniels@collabora.com>
* meson: Fix deprecation warning for pkgconfigScott Anderson2019-02-011-1/+1
| | | | | | | | | | | Meson 0.49 now issues a warning for libraries being passed into the 'libraries' keyword argument. Now they should be passed as a positional argument. See https://mesonbuild.com/Release-notes-for-0-49-0.html#deprecation-warning-in-pkgconfig-generator Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
* Add Meson build systemDaniel Stone2018-12-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson is a build system, currently implemented in Python, with multiple output backends, including Ninja and Make. The build file syntax is clean and easy to read unlike autotools. In practise, configuring and building with Meson and Ninja has been observed to be much faster than with autotools. Also cross-building support is excellent. More information at http://mesonbuild.com Since moving to Meson requires some changes from users in any case, we took this opportunity to revamp build options. Most of the build options still exist, some have changed names or more, and a few have been dropped. The option to choose the Cairo flavour is not implemented since for the longest time the Cairo image backend has been the only recommended one. This Meson build should be fully functional and it installs everything an all-enabled autotools build does. Installed pkg-config files have some minor differences that should be insignificant. Building of some developer documentation that was never installed with autotools is missing. It is expected that the autotools build system will be removed soon after the next Weston release. Signed-off-by: Daniel Stone <daniels@collabora.com> Co-authored-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Pekka Paalanen <pq@iki.fi>
* libweston-desktop/xdg-shell: update view transforms for xdg popup surfacesMichael Olbrich2018-11-021-0/+7
| | | | | | | | | | | | For toplevel surfaces, the shell will do the same thing. Without this, the commit does not trigger repaints, because the output mask for the surface is not set. Without this the popup is not shown unless something else triggers a repaint. This is usually not seen because the mouse cursor triggers a repaint at the same time. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* libweston: make wl_output point to weston_headPekka Paalanen2018-04-102-2/+2
| | | | | | | | | | | | | | | | | | | | | The user data of a wl_resource representing a wl_output protocol object used to be a pointer to weston_output. Now that weston_output is being split, wl_output more accurately refers to weston_head which is a single monitor. Change the wl_output user data to point to weston_head. weston_output_from_resource() is replaced with weston_head_from_resource(). This change is not strictly necessary, but architecturally it is the right thing to do. In the future there might appear the need to refer to a specific head of a cloned pair, for instance. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v5 Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Ian Ray <ian.ray@ge.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Derek Foreman <derekf@osg.samsung.com>
* libweston-desktop/xdg-shell-v6: Fix crash when surface has buffer at creationDerek Foreman2018-03-141-2/+1
| | | | | | | | | | | | | | When a surface has a buffer at creation time we send an error, which results in a disconnection and all resources being destroyed. Since we send that error and return before performing the configure_list init weston_desktop_xdg_surface_destroy() will walk an uninitialized list and dereference a NULL pointer. Initializing the list earlier prevents this from happening. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston: Make weston_seat release safeAlexandros Frantzis2018-02-153-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure the server can safely handle client requests for wl_seat resource that have become inert due to weston_seat object release and subsequent destruction. The clean-up involves, among other things, unsetting the destroyed weston_seat object from the user data of wl_seat resources, and handling this NULL user data case where required. The list of sites extracting and using weston_seat object from wl_seat resources which were audited for this patch are: Legend: N/A = Not Applicable (not implemented by weston) FIXED = Fixed in the commit OK = Already works correctly == keyboard_shortcuts_inhibit_unstable_v1 == [N/A] zwp_keyboard_shortcuts_inhibit_manager_v1.inhibit_shortcuts == tablet_input_unstable_v{1,2} == [N/A] zwp_tablet_manager_v{1,2}.get_tablet_seat == text_input_unstable_v1 == [FIXED] zwp_text_input_v1.activate [FIXED] zwp_text_input_v1.deactivate == wl_data_device == [FIXED] wl_data_device_manager.get_data_device [OK] wl_data_device.start_drag [FIXED] wl_data_device.set_selection [OK] wl_data_device.release == wl_shell == [FIXED] wl_shell_surface.move [FIXED] wl_shell_surface.resize [FIXED] wl_shell_surface.set_popup == xdg_shell and xdg_shell_unstable_v6 == [FIXED] xdg_toplevel.show_window_menu [FIXED] xdg_toplevel.move [FIXED] xdg_toplevel.resize [FIXED] xdg_popup.grab == xdg_shell_unstable_v5 == [FIXED] xdg_shell.get_xdg_popup [FIXED] xdg_surface.show_window_menu [FIXED] xdg_surface.move [FIXED] xdg_surface.resize Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop/xdg-shell-v5: Drop xdg-shell v5 supportAlexandros Frantzis2018-02-143-924/+0
| | | | | | | | | | | | | | | Drop support for the obsolete xdg-shell v5 protocol. This clears the path to properly support xdg-shell stable, since xdg-shell stable and xdg-shell v5 can't currently co-exist in the same compositor, as both define structures with the same name (such as struct xdg_surface_interface). Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Proposed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xwayland: Make sure racy surfaces are properly mappedQuentin Glidic2017-12-111-0/+10
| | | | | | | | | | | | | This fixes a race between Xwayland committing the surface content via the wl_surface, and the XWM setting the role of the surface. We now keep track of the (first) content commit on the surface and forward it to the shell when we finally get the role. There is no need to track later changes, as the only way for Xwayland to unmap a surface is to destroy it. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Daniel Stone <daniels@collabora.com>
* libweston-desktop: add signal for title/app-id changesMatt Hoosier2017-12-082-4/+21
| | | | | | | | | | | | | | As discussed on https://lists.freedesktop.org/archives/wayland-devel/2017-August/034720.html, it's useful for the shell implementation to know when these change, for example to relay the information on to taskbars or similar. To avoid ABI changes or the need to make the weston_desktop_surface definition public, new functions are introduced for attaching listeners to these signals. Signed-off-by: Matt Hoosier <matt.hoosier@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston: Use struct timespec for touch motion eventsAlexandros Frantzis2017-11-271-1/+2
| | | | | | | | | | | Change code related to touch motion events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Use struct timespec for touch up eventsAlexandros Frantzis2017-11-271-1/+2
| | | | | | | | | | | Change code related to touch up events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Use struct timespec for touch down eventsAlexandros Frantzis2017-11-271-1/+2
| | | | | | | | | | | Change code related to touch down events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Use struct timespec for key eventsAlexandros Frantzis2017-11-271-1/+2
| | | | | | | | | | | Change code related to key events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Use struct timespec for axis eventsAlexandros Frantzis2017-11-271-1/+1
| | | | | | | | | | | Change code related to axis events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Use struct timespec for button eventsAlexandros Frantzis2017-11-271-2/+5
| | | | | | | | | | | Change code related to button events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Use struct timespec for motion eventsAlexandros Frantzis2017-11-271-1/+1
| | | | | | | | | | | Change code related to motion events to use struct timespec to represent time. This commit is part of a larger effort to transition the Weston codebase to struct timespec. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* buildsystem: add missing pkg-config stub for libweston uninstalledReynaldo H. Verdejo Pinochet2017-11-101-0/+9
| | | | | | | | | | | | | | | | | | | -uninstalled.pc files are a pkg-config facility for working with uninstalled libraries. With pkg-config, foo-uninstalled.pc overrides foo.pc. foo-uninstalled.pc should never be installed, and will be generated with references to the build directory. If you set up your environment so pkg-config looks for .pc files in your build directories, you can use this to build and link against libraries you haven't installed with "make install". This can save time and space over installing with a prefix. Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> Acked-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* libweston-desktop/xdg-shell-v6: Actually send same-as-current configure if ↵Quentin Glidic2017-10-181-6/+25
| | | | | | | | | | | | | | | needed If a surface is in state A, and we just sent a configure for state B, setting back state A would be ignored, because state B has not been committed yet. Now, we check against the latest configured state (which is current state if configure list is empty). Reported on wlroots https://github.com/swaywm/wlroots/pull/280 Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xdg-shell-v6: Ensure first configure is sentQuentin Glidic2017-08-301-14/+14
| | | | | | | | | | | | | | | | | | | | The old code for scheduling configure events on idle looked like: if (configure_scheduled) { if (this_event_is_the_same) { remove_timer(); return; } } If we queued one new event (either changed, or the client had never received any configure event), followed immediately by one event which was the same as the first, we would delete the scheduled send of the first event. Fix this by treating unconfigured surface as never the same. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
* libweston-desktop/xdg-shell-v5: initialize configure listArnaud Vrac2017-08-051-0/+2
| | | | | | | Without this weston crashes when a client using xdg-shell-v5 is run. Signed-off-by: Arnaud Vrac <rawoul@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop/xdg-shell: Properly properly handle ack_configureDerek Foreman2017-07-272-2/+6
| | | | | | | | | | | | | | | | | commit 749637a8a306588964885fe6b25fda6087a84ccd introduced this feature, but the break is outside of any conditional so only the first item in the list is ever tested. If a client skips a few configures and then acks the most recent it's still operating within spec, so the break should only occur when a match is found. This version also adds a break after we miss the target, as a tiny optimization (the list will be cleaned up on disconnect anyway), as it makes the code no more difficult to read or maintain. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop/xdg-shell: Check window geometry instead of surface size ↵Philipp Kerling2017-07-262-2/+9
| | | | | | | | | | | | | | | | | against configured size Shell surfaces may have a geometry that is different to the size of their main surface, e.g. due to subcompositing. In states where size is strictly enforced (fullscreen and maximized), the size that the compositor wants must be checked against the window geometry and not just the main surface size. Fix by calling weston_desktop_surface_get_geometry and using that size instead of main surface size. Signed-off-by: Philipp Kerling <pkerling@casix.org> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston: introduce weston_output_from_resource()Pekka Paalanen2017-07-253-3/+3
| | | | | | | | | | | | | | This is a simple wrapper for casting the user data of a wl_resource into a struct weston_output pointer. Using the wrapper clearly marks all the places where a wl_output protocol object is used. Replace ALL wl_output related calls to wl_resource_get_user_data() with a call to weston_output_from_resource(). v2: add type assert in weston_output_from_resource(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
* xwm: update override-redirect surface's position upon configure_notifyIlia Bozhinov2017-07-211-1/+1
| | | | | | | | | | | When we receive configure_notify we should update the surface's position by calling xwayland_api->set_xwayland(). Otherwise some surfaces like dnd surfaces from xwayland views are "stuck" at one place. When setting XWAYLAND state though we should always call view_set_position(), not just the first time we set this state. Signed-off-by: Ilia Bozhinov <ammen99@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop/xdg-shell: Properly handle ack_configureQuentin Glidic2017-07-202-17/+122
| | | | | | | | Now we keep track of serial->state association and we discard the states that the client ignored. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xdg-shell: Check surface size against acknowledged sizeQuentin Glidic2017-07-182-4/+8
| | | | | | | | | | We were checking against the pending size, which lead some clients (simple-egl) to crash because they sent a buffer before acknowledging the latest configure event. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xdg-shell: Add pending/next/current structsQuentin Glidic2017-07-122-79/+98
| | | | | | Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
* libweston-desktop/xdg-shell: Rename requested_ to pending_Quentin Glidic2017-07-122-57/+57
| | | | | | Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
* libweston-desktop/xdg-shell: Consolidate configure event sendingQuentin Glidic2017-06-262-63/+113
| | | | | | | | | | | | When switching a state twice in a row, we were overwriting the old value without setting it back, sending a wrong state to the client. Now we update our requested state, then check if we need to schedule a configure event, if we have one scheduled already or even if we can cancel it. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
* libweston-desktop/xdg_shell_v6: Send error on wrongly-sized bufferQuentin Glidic2017-06-261-16/+20
| | | | | Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
* libweston-desktop/xwayland: react to geometry changesPekka Paalanen2017-04-131-0/+7
| | | | | | | | | | | | Fix up the window position whenever the geometry info changes. If the window geometry changes, we want to keep the input-responding content anchored to top-left. It is done by manipulating the dx,dy arguments originating from a wl_surface.attach request. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Daniel Stone <daniels@collabora.com>
* libweston-desktop: add set_xwayland_position APIPekka Paalanen2017-01-184-0/+59
| | | | | | | | | | | | | | | | | | | | | X11 applications expect -geometry command line option to work for setting the initial window position, but currently this does not work. Add provision to relay the initial position through libweston-desktop: - weston_desktop_api gains a new entry set_xwayland_position - implement set_toplevel_with_position() in xwayland internal interface Once xwayland plugin starts calling set_toplevel_with_position(), libweston-desktop can relay that information to a shell if the shell wants to hear it. If a shell does not implement the set_xwayland_position hook, the old behaviour remains: the shell positions xwayland toplevels like any other. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
* libweston: Position layers in an absolute wayQuentin Glidic2017-01-171-1/+5
| | | | | | | | | | | | | Currently, layers’ order depends on the module loading order and it does not survive runtime modifications (like shell locking/unlocking). With this patch, modules can safely add their own layer at the expected position in the stack, with runtime persistence. v4 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Daniel Stone <daniels@collabora.com> [Pekka: fix three whitespace issues] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston-desktop/xwayland: debug commitsPekka Paalanen2017-01-171-0/+4
| | | | | | | | | Helps tracking what happens with XWM. Use the same debugging guard as XWM. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop: don't crash when getting the pid for X clientsGiulio Camuffo2016-12-082-1/+9
| | | | | | | | X client's don't have a wl_client associated with their weston_desktop_client, so make sure to not use it. Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* Don't prepend protocol/ to include pathsDaniel Stone2016-11-292-2/+2
| | | | | | | | No need to add protocol/, as it's already handled by an explicit compiler include path. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Dima Ryazanov <dima@gmail.com>
* libweston-desktop/xwayland: add is_mapped handling for XWAYLANDPekka Paalanen2016-11-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The xwayland window type XWAYLAND is not handled by the shell at all, instead libweston-desktop maps such surfaces itself. However, it forgot to set weston_surface::is_mapped and weston_view::is_mapped. weston_surface::is_mapped affects the behaviour of weston_view_unmap() and weston_surface_attach(). weston_view::is_mapped affects the behaviour of weston_view_unmap() and weston_view_destroy(). When manually mapping a window of type XWAYLAND, mark both the view and surface as mapped. This follows the expections in libweston, even though the meaning of is_mapped is not clearly defined for either surface or view. Also, when the XWAYLAND window is manually unmapped, unmap the weston_surface. This updates weston_surface::is_mapped to reflect the state. However, as a side-effect it will also unmap all sibling views, should any exist. v2: rename surface_base to wsurface Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Daniel Stone <daniels@collabora.com>
* libweston-desktop/xwayland: XWAYLAND surfaces are never 'added'Pekka Paalanen2016-11-251-0/+4
| | | | | | | | | Add documentation (asserts) that show that windows of types XWAYLAND are never registered with the shell. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop/xwayland: clarify 'added' logicPekka Paalanen2016-11-251-1/+2
| | | | | | | | | | | Setting to a constant is much easier to read and grep for than setting to a computed variable. There are no functional changes. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop/xwayland: window type XWAYLAND cannot have a parentPekka Paalanen2016-11-251-0/+1
| | | | | | | | | | | | Add an assert to ensure that a window of type XWAYLAND is never attempted with a parent. Following the code though, the assert can be made even stricter by allowing only TRANSIENT to have a parent. This is essentially adding documentation. v2: use stricter assert Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
* xdg-shell: validate positioner objectSjoerd Simons2016-11-161-0/+9
| | | | | | | | | | | | | | According to the xdg-shell v6 protocol a positioner object is only complete if both the size and its anchor rectangle are set. Ensure the weston clients do this and let weston be more strict on checking if a client has done so. This also fixes weston-terminal popups not showing up on gnome-shell 3.22. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
* libweston-desktop: destroy wl_shell_surface after the wl_surface is destroyedGiulio Camuffo2016-10-141-0/+21
| | | | | | | | | The wl_shell_surface spec says that it is destroyed automatically by the server when the wl_surface is destroyed, and indeed it does not have a destroy request. So, do that. Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop: fix sending the configure event with wl_shellGiulio Camuffo2016-10-011-0/+1
| | | | Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop: Fix some clang warningsArmin Krezović2016-09-243-3/+9
| | | | | | | | | | Fixes: implicit conversion from enumeration type '...' to different enumeration type '...' [-Wenum-conversion] Signed-off-by: Armin Krezović <krezovic.armin@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* libweston-desktop: Fix configure event for already well-sized surfacesQuentin Glidic2016-09-143-8/+12
| | | | | | | | | Even if the surface size is already correct, we need to store the configured size in case some other state change triggers a configure event. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
* libweston-desktop/xdg_shell_v6: Raise errors on not-yet-possible requestsQuentin Glidic2016-09-121-0/+21
| | | | | | | | These requests need a mapped surface, which can only happen after the initial configure event. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xdg_shell_v6: Add surface as neededQuentin Glidic2016-09-121-4/+20
| | | | | Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xdg_shell_v5: Add surface as neededQuentin Glidic2016-09-071-10/+32
| | | | | | | | This way we are sure the compositor is aware of a surface when we forward a request for said surface. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libweston-desktop/xwayland: Do not over-destroy the viewQuentin Glidic2016-09-011-4/+2
| | | | | | | | With this weston_view_destroy() call, Xwayland popups make Weston freeze in a busy-loop (probably corrupted wl_list). Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>