summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* configure.ac: bump to version 4.0.0 for the official release4.0.04.0Derek Foreman2018-04-091-2/+2
|
* terminal: Fix unintended fallthrough to cursor restoreDaniel Stone2018-04-051-0/+1
| | | | | | | | | | | | | | ef57a9b788 added support for window operations such as reporting the title in escape mode. It implemented this by which-window-op case, inside the existing which-escape-code case. Whilst it would break out of the former window-op case, it never broke out of the latter escape-code case. This would lead to window ops (such as reporting title) falling through to restoring the saved cursor position. This doesn't seem at all right, and also fixes a warning with GCC 8. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* configure.ac: bump to version 3.0.93 for the RC1 release3.0.93Derek Foreman2018-04-021-1/+1
|
* Partially revert "xwm: Add icon support to the frame" and friendsDerek Foreman2018-04-021-86/+2
| | | | | | | | | | | | | | | | | | | | | | This (partially) reverts commit bef761796c2ada6344d227142af4a0f40b9760dd. This (partially) reverts commit 4d1cd36c9ea041688f92cd8981e43b5fe3b52409. This (partially) reverts commit 44fc1be913ab2faad0414f50e51d58310302d065. This (partially) reverts commit 6b58ea8c43ac81e519bd418efbf24687a5d731b8. The new xwm icon code has proven to be leaky and incomplete, and while we have patches under consideration to fix the rest of its known problems they still require changes and review cycles. Currently the known leaks have been squashed, but it still picks wrong sized icons and does no scaling, which can lead to very strange rendering. At window close time the wrong sized icon appears above the window during fade out. This patch reverts the mostly solid bits and keeps the unfinished bits behind in favor of a simpler revert than removing the whole thing. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* Revert "xwm: do not include shadow in input region"Derek Foreman2018-03-281-34/+0
| | | | | | | | | | | | This reverts commit 332d1892bbb380b32ff1c9f99d20184b447535dd. And re-introduces the bug it was intended to fix, see: https://lists.freedesktop.org/archives/wayland-devel/2017-December/036402.html Reverting this because it causes harm to all xwayland clients - the input region no longer gets adjusted when resizing windows. start an xterm, resize it larger, you can no longer interact with the new area of the window (including the server side decor).
* xwm: Fix two more icon related memory leaksDerek Foreman2018-03-281-0/+5
| | | | | | | | | | | | | | Hopefully sort the last leaks introduced in commit 6b58ea8c The window could be destroyed before it had a frame but after it had an icon (I could trigger this with firefox), and the window could be assigned an icon twice before it had a frame (I could trigger this with terminology). The latter leak was Reported-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: remove dead assignments in layer transitionEmre Ucan2018-03-281-5/+4
| | | | | Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: initialize ret in repaint_timer_handlerEmre Ucan2018-03-281-1/+1
| | | | | | | | If output_list of compositor is empty, value of ret is read without initialization. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* gl-renderer: set num_images after import_simple_dmabufEmre Ucan2018-03-281-0/+1
| | | | | | | | | | | we have to set num_images after import_simple_dmabuf call. Otherwise, egl_images will not be correctly referenced in gl_renderer_attach_dmabuf. (Found by clang source code analyzer) Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* input: fix use-after-free issue at pointer_cancelEmre Ucan2018-03-281-12/+0
| | | | | | | | | | | | | | | | If the constraint is an one-shot constraint, constraint is freed in disable_pointer_constraint function. Therefore, we should not try to read freed memory at "switch (constraint->lifetime)" statement. The removed code is anyway superfluous. Because surface destroy signal is only removed, when constraint is an one-shot constraint. (Found by clang source code analyzer) Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* hmi-controller: remove dead assignments in add_launchersEmre Ucan2018-03-281-4/+0
| | | | | | | | | | assigned values of x, y, ret and layout_surface are never read. (Found by clang source code analyzer) Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: remove dead assigment in drm_fb_create_dumbEmre Ucan2018-03-281-2/+0
| | | | | | | | | ret is overwritten by drmModeAddFB2 call (Found by clang source code analyzer) Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwm: Fix memory leakScott Moreau2018-03-271-2/+19
| | | | | | | | | | | A memory leak introduced by 6b58ea8c led to me finding a bigger leak, which is xwm was calling frame_create() without calling frame_destroy(). This meant that the associated icon_surface was not being destroyed, leaving the destroy handler for it broken. Here we fix this by calling frame_destroy() when the window is destroyed and free the reply in the icon_surface destroy handler. Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Revert "xwm: Fix memory leak"Pekka Paalanen2018-03-201-2/+0
| | | | | | | | | | | | | | This reverts commit d2cb711d813e750b1e303e6200c027fd27a21f8e. I missed the call to cairo_image_surface_create_for_data() which assumes the data will remain present until the cairo surface is destroyed. It seems the existence of data depends on the reply not being freed. This will need a more involved fix. Sorry, I noticed this just seconds after I pushed the patch. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwm: Fix memory leakScott Moreau2018-03-201-0/+2
| | | | | | | Fix memory leak introduced by 6b58ea8c. weston_wm_handle_icon() was calling xcb_get_property_reply() without freeing the reply. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure.ac: bump to version 3.0.92 for the beta release3.0.92Derek Foreman2018-03-191-1/+1
|
* simple-dmabuf-drm: use appropriately sized buffer (freedreno)Guido Günther2018-03-191-3/+5
| | | | | | | | | | Use stride instead of width for buffer calculation. [Derek Foreman edited the commit log and removed the leftover initialization of 'size'] Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* simple-dmabuf-drm: Always define ALIGNGuido Günther2018-03-191-1/+1
| | | | | | | Other backends might want to use it. Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* Fix an uninitialized variableDima Ryazanov2018-03-191-0/+1
| | | | | | | | | | "has_discrete" gets set to true in if/else if, but gets left unset otherwise. So let's initialize it to false. (This was caught by valgrind.) Signed-off-by: Dima Ryazanov <dima@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-dmabuf-drm: use getopt_longGuido Günther2018-03-191-24/+27
| | | | | Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-dmabuf-drm: use opt bitmask instead of is_immediateGuido Günther2018-03-191-6/+6
| | | | | Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Allow simple-dmabuf-drm to pass y_inverted flagGuido Günther2018-03-191-8/+23
| | | | | | | | | | | This allows to check if ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT is interpreted correctly by the compositor. We introduce an OPT_* bitmask to hold this flag and possible future command line flags. Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* .gitignore weston-simple-dmabuf-drmGuido Günther2018-03-161-1/+1
| | | | | | | Got renamed in f9dec67990a54afe14d4d2db694bf696ae418bcd Signed-off-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* weston: Add a help string for --xwaylandDima Ryazanov2018-03-161-0/+1
| | | | | Signed-off-by: Dima Ryazanov <dima@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-dmabuf-drm: use vfunc for drm_device_destroyGuido Günther2018-03-161-7/+17
| | | | | | | Remove ifdef clutter and makes sure it's only called for the active backend. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simpla-dmabuf-drm: Use more weston like coding styleGuido Günther2018-03-161-10/+10
| | | | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-dmabuf-drm: allow multiple backendsGuido Günther2018-03-163-35/+47
| | | | | | | | This allows to enable freedreno and intel backends at the same time building the prerequisites for adding further ones. [Pekka: fix configure.ac if statements] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure.ac: fix have_dbus if dbus support is disabledMichael Tretter2018-03-161-0/+1
| | | | | | | | | If dbus support is explicitly disabled, $have_dbus should be no, but was empty. systemd-login support depends on dbus, but the check does not trigger correctly, if $have_dbus is empty. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: do not free output region twice in weston_output_set_transform()Ilia Bozhinov2018-03-161-3/+0
| | | | | | | | | This is already done when weston_output_init_geometry() is called. Actually this is a fix for 8564a0d, because without this patch, the compositor sometimes crashes when setting output transform Signed-off-by: Ilia Bozhinov <ammen99@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: honour libinput header locationJan Engelhardt2018-03-161-1/+4
| | | | | | | | | | | | | | | | Add the respective CFLAGS to the build, otherwise it will error out as seen below. src/libinput-seat.c:30:22: fatal error: libinput.h: No such file or directory v2: add the CFLAGS only as needed, suggested by Pekka Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Cc: Jan Engelhardt <jengelh@inai.de> [Emil Velikov: polish commit message, v2] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston/compositor: Place timeline recording after checking if stamp is validMarius Vlad2018-03-151-2/+3
| | | | | | | | | | The timestamp could be either NULL if there's no mode set, or 0 when output gets awaken. It either crashes weston or we get vblanks at [0, 0] for that output. Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com> CC: Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka: note, most start_repaint_loop pass in current time, not 0] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* 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>
* clients: consolidate timer code part 2Pekka Paalanen2018-03-123-87/+24
| | | | | | | | | | | | | Continue moving bits to use toytimer instead of carelessly open-coded equivalent. Many of the copies were flawed against the race mentioned in toytimer_fire(). This patch handles window.c's key repeat, confine demo, and desktop-shell panel clock. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Acked-by: Daniel Stone <daniels@collabora.com>
* clients: consolidate timer code part 1Pekka Paalanen2018-03-123-78/+135
| | | | | | | | | | | | | | There are multiple copies for the timerfd handling code, and I need a timer in one more app. Consolidate all the timerfd code into window.c to reduce the duplication. Many of the copies were also flawed against the race mentioned in toytimer_fire(). This patch handles clickdot and window.c's tooltip timer and cursor timer. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Acked-by: Daniel Stone <daniels@collabora.com>
* compositor-wayland: Ignore pointer enter on destroyed surfaceDaniel Stone2018-03-091-0/+7
| | | | | | | | | | | | | | Due to race conditions, it is (vanishingly unlikely but) possible to receive a wl_pointer.enter event referring to a wl_surface we have just destroyed. If this happens, wl_surface will be NULL. Detect this, clear out our focus, and return. Other pointer and keyboard events are robust against destroyed surfaces. Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka: remove call to input_set_cursor()] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* input: never set keyboard focus without wl_resourcePekka Paalanen2018-03-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | Do not attempt to set keyboard focus to a surface that has no wl_resource. The destroy listener hangs off the wl_resource, so if that is not present, nothing will clean up the pointer when the weston_surface gets destroyed and it goes stale. As keyboard_focus_resource_destroyed() sets the focus to NULL, this patch should be enough to guarantee that the keyboard focus surface will always have a wl_resource. I have confirmed the added branch in weston_keyboard_set_focus() can be hit, but doing so is hard. My test case has weston/x11 with two outputs, and weston/wayland --sprawl running on top of that, then closing the parent compositor output windows one by one. Sometimes it hits, often it does not. Having the window closing animation enabled may help to hit it. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
* compositor-wayland: handle wl_keyboard.enter(NULL)Pekka Paalanen2018-03-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Destroying an output (wl_surface) can race against the parent compositor sending wl_keyboard.enter. When this race is lost, wayland-backend receives wl_keyboard.enter with a NULL wl_surface for the surface it just destroyed. Handle this case by ignoring such enter events. Since it is theoretically possible to follow enter with key events, drop those too. The modifiers event is sent before enter, so we cannot drop that on the same condition. wl_keyboard.leave handler seems to already handle the NULL focus case, but there is a question if the notify_keyboard_focus_out() call should be avoided. This patch fixes a hard to reproduce crash. I was running weston/x11 with two outputs, and weston/wayland --sprawl inside that, then closing the parent compositor windows one by one. Sometimes it would trigger this crash. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
* autoconf: Remove configure line forgotten in ↵Emmanuel Gil Peyrot2018-03-061-1/+0
| | | | | | | bb707dc0fe331c9af112a0552b7aa6fde755dd83 Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* gl-renderer: Create a high priority contextChris Wilson2018-03-011-2/+34
| | | | | | | | | | | | | | | | | EGL_IMG_context_priority allows the client to request that their rendering be considered high priority. For ourselves, this is important as we are interactive and any delay in our rendering causes input-output jitter; a less than smooth user interactive. So if the driver supports setting the context priority, try and create our EGLContext as high priority. The driver may reject our request due to system restrictions, in which case it will fallback to normal priority, but if successful it will reschedule our rendering and all of its dependencies to execute earlier, especially important when the GPU is being hogged by background clients. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: Remove no_addfb2 handlingDaniel Stone2018-02-271-33/+14
| | | | | | | | | | | | | | | | | | | If AddFB2 ever fails for any reason, we fall back to legacy AddFB, which doesn't support the same swathe of formats, or multi-planar formats, or modifiers. This can happen with arbitrary client buffers, condemning us to the fallback forever more. Remove this, at the cost of an unnecessary ioctl for users on old kernels without AddFB2; unfortunately, we cannot detect the complete absence of the ioctl, as the return here is -EINVAL rather than -ENOTTY. A check for whether or not the format is valid has been replaced with an assert, as its callers either check that the format is non-zero, return a FourCC format code from GBM, or use a static FourCC format. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: Rename region variableDaniel Stone2018-02-271-5/+6
| | | | | | | Make it a bit more clear what the purpose of the variable is. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: Don't need safe view-list traversalDaniel Stone2018-02-271-2/+2
| | | | | | | Nothing in this loop reorders views within the compositor's view_list. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure.ac: bump to version 3.0.91 for the alpha release3.0.91Derek Foreman2018-02-261-1/+1
|
* compositor-rdp: Correct mouse scrolling directionJason Gerecke2018-02-211-1/+1
| | | | | | | | | | | | | | The direction of scrolling in the RDP compositor appears to be inverted. When using Weston directly in X, sending X11 button 4 cuases window contents to scroll up and button 4 to be reported to xwayland clients. Conversely, when using Weston through RDP (xfreerdp client), sending X11 button 4 causes window contents to scroll down and button 5 to be reported to xwayland clients. The xfreerdp client does not seem to be the cause of this since scrolling works correctly when connecting to a Windows host. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: David Fort <contact@hardening-consulting.com>
* compositor-drm: handle null cursor_planeGreg V2018-02-201-2/+4
| | | | | | Was crashing when I tried to take a screenshot. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Implement touch timestamps for input_timestamps_unstable_v1Alexandros Frantzis2018-02-203-7/+108
| | | | | | | | | | Implement the zwp_input_timestamps_manager_v1.get_touch_timestamps request to subscribe to timestamp events for wl_touch resources. Ensure that the request handling code can gracefully handle inert touch resources. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Implement pointer timestamps for input_timestamps_unstable_v1Alexandros Frantzis2018-02-203-6/+119
| | | | | | | | | | Implement the zwp_input_timestamps_manager_v1.get_pointer_timestamps request to subscribe to timestamp events for wl_pointer resources. Ensure that the request handling code can gracefully handle inert pointer resources. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Implement keyboard timestamps for input_timestamps_unstable_v1Alexandros Frantzis2018-02-203-3/+145
| | | | | | | | | | | | | | Implement the zwp_input_timestamps_manager_v1.get_keyboard_timestamps request to subscribe to timestamp events for wl_keyboard resources. Ensure that the request handling code can gracefully handle inert keyboard resources. This commit introduces a few internal helper functions which will also be useful in the implementation of the remaining zwp_input_timestamps_manager_v1 requests. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libweston: Introduce input-timestamps supportAlexandros Frantzis2018-02-202-1/+70
| | | | | | | | | | | | | Introduce code to support the implementation of the input_timestamps_unstable_v1 protocol in libweston. This commit does not implement the actual timestamp subscriptions, but sets up the zwp_input_timestamps_manager_v1 object and introduces dummy request handling functions for it, laying the foundation for timestamp subscriptions for keyboard/pointer/touch to be added cleanly in upcoming commits. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Introduce input timestamps helperAlexandros Frantzis2018-02-206-6/+263
| | | | | | | | | | | | | | Introduce helper test code to implement the client side of the input_timestamps_unstable_v1 protocol. This helper will be used in upcoming commits to test the server side implementation of the protocol in libweston. The input_timestamps_unstable_v1 protocol was introduced in version 1.13 of wayland-protocols, so this commit updates the version dependency in configure.ac accordingly. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>