Commits on Source (14)
-
Currently the frame event gets lost: The touch focus is removed in the 'up' event. So the focus is gone when the frame event arrives so it is never sent to the clients. To avoid this, keep the touch focus until the frame is handled. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 54485801) This has undergone a change to avoid an ABI break, so rather than hooking up a pending_touch boolean in weston_touch, keep a local list of weston_touch_devices and have a pending_touch with each device to check upon. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
cf1ca2c3 -
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 631b60b3)
870db970 -
As things are, even when mode=current is specified on the .ini file, a full modeset is needed (and done), which causes a very noticeable screen blinking. That is because setting the max_bpc on a connector needs full modesetting. The idea here is that if mode=current on the .ini, no modesetting should be done, so the current max_bpc is programmed into the connector. But if a custom max-bpc=... is specified, that will be used instead, even if mode=current on the .ini Fixes: wayland/weston#660 Signed-off-by: vanfanel <redwindwanderer@gmail.com> (cherry picked from commit 3240ccc6)
24ee6144 -
Marius Vlad authored
As seen previous times, with newer doxygen version we seem to be generating warnings and with it to stop generating documentation entirely as we have enabled warning as error in the doxygen configuration file. By default meson werror build option is not enabled, so users can still generate documentation when building regularly, and when we'll update to the same doxygen version we should be able to catch those errors up if any of them will pile up in between. Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit 402d9a81)
0da83cc1 -
Marius Vlad authored
As clipboard_find_supported_format_by_mime_type() can return -1 if it can't find out an index avoid trying to print outside of the array. Fixes the following warnings triggered when enabling FORTIFY_SOURCE combined with optimizations (-O) ../libweston/backend-rdp/rdpclip.c:1114:17: error: array subscript -1 is below array bounds of ‘uint32_t[5]’ {aka ‘unsigned int[5]’} [-Werror=array-bounds] 1114 | weston_log("RDP %s (%p:%s) specified format \"%s\" index:%d formatId:%d is not supported by client\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1115 | __func__, source, clipboard_data_source_state_to_string(source), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | mime_type, index, source->client_format_id_table[index]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../libweston/backend-rdp/rdpclip.c:131:18: note: while referencing ‘client_format_id_table’ 131 | uint32_t client_format_id_table[RDP_NUM_CLIPBOARD_FORMATS]; Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit 9455ad7c)
715eb67c -
Marius Vlad authored
Fixes the following warnings when building with _FORTIFY_SOURCE and optimizations enabled: ../shared/xalloc.h:49:9: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 49 | write(STDERR_FILENO, oommsg, strlen(oommsg)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ or ../compositor/main.c:427:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 427 | write(STDERR_FILENO, fail_seteuid, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 428 | strlen(fail_seteuid)); | ~~~~~~~~~~~~~~~~~~~~~ ../compositor/main.c:434:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 434 | write(STDERR_FILENO, fail_cloexec, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 435 | strlen(fail_cloexec)); | ~~~~~~~~~~~~~~~~~~~~~ ../compositor/main.c:442:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 442 | write(STDERR_FILENO, fail_exec, strlen(fail_exec)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit 8c4cdd78)
00a78294 -
Currently we can't tell the difference between a window intentionally created at 0,0 and a window that we can place anywhere. Check the size hints to see if the flags indicating the placement is intentional are present. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> (cherry picked from commit 1cb46994)
5517953e -
This adds a destroy listener on the SHM buffer provided by our client. It will unregister the frame notify listener in case our buffer is destroyed before the frame signal is emitted and thus avoid a memcpy to invalid memory. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> (cherry picked from commit 0afd3428)
7678ec92 -
The activation of a view implies, among other things, a change in the associated view layer which is initially unset. In order for this change to be reflected in the corresponding surface's output mask, and hence allow surface damage to trigger output repaints, we need to update the view transform. Fixes #674 Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> (cherry picked from commit 341d09d2)
7a8392d2 -
If a controller requests the layers under a surface that has no views attached, Weston crashes since it tries to free the array that would be used to return the found layers, but has not been allocated before. Free the ppArray only if it was allocated in ivi_layout_get_layers_under_surface before and no layers were found. While at it, make it obvious that checking the length is an integer comparison by comparing it to 0. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> (cherry picked from commit c56e69bc)
72a69294 -
The ivi-shell keeps track of its surfaces by adding them to the ivi_surface_list to be able to remove them on shutdown. It also creates an ivi_layout_surface for a desktop surface, but does not keep track of these surfaces. During compositor shutdown, libweston prints the following message: BUG: finalizing a layer with views still on it. Fix it by adding the created ivi_layout_surface to the ivi_surface_list to remove the surfaces from the layer during shutdown. Furthermore, remove the ivi_layout_surface from the desktop surface and free it when the desktop surface is destroyed. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> (cherry picked from commit 266e2e1d) Resolved small conflict which arose due to commit cbf476f2. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
e7cf894f -
The mouse button and touch bindings to activate a surface shouldn't use the binding modifier. Fixes: wayland/weston#679 Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> (cherry picked from commit 723709aa)
ad7c5162 -
Marius Vlad authored
Shutting down the compositor gives us: Invalid write of size 8 at 0x4B1AEDB: wl_list_remove (wayland-util.c:56) by 0x4AF05BF: weston_signal_emit_mutable (signal.c:66) by 0x4ACBC2C: weston_compositor_destroy (compositor.c:8629) by 0x4864A4B: wet_main (main.c:3908) by 0x10915D: main (executable.c:33) Address 0x17435f20 is 224 bytes inside a block of size 384 free'd at 0x484617B: free (vg_replace_malloc.c:872) by 0x17718C7E: hmi_controller_destroy (hmi-controller.c:761) by 0x4AF059A: weston_signal_emit_mutable (signal.c:62) by 0x4ACBC2C: weston_compositor_destroy (compositor.c:8629) by 0x4864A4B: wet_main (main.c:3908) by 0x10915D: main (executable.c:33) Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit cfbf2b0a)
097ed472 -
Marius Vlad authored
To avoid the following UAF: Invalid read of size 8 at 0x4AE5EFF: weston_desktop_get_display (libweston-desktop.c:110) by 0x4AEB2C9: weston_desktop_xdg_surface_schedule_configure (xdg-shell.c:1160) by 0x4AEA77A: weston_desktop_xdg_toplevel_set_size (xdg-shell.c:711) by 0x4AE839D: weston_desktop_surface_set_size (surface.c:504) by 0x63F7D43: ivi_layout_surface_set_size (ivi-layout.c:1599) by 0x63F949F: transition_move_resize_view_destroy (ivi-layout-transition.c:311) by 0x63F9397: layout_transition_destroy (ivi-layout-transition.c:259) by 0x63F8E0B: ivi_layout_remove_all_surface_transitions (ivi-layout-transition.c:121) by 0x63F4BC1: ivi_layout_surface_destroy (ivi-layout.c:258) by 0x63F38AF: layout_surface_cleanup (ivi-shell.c:162) by 0x63F3D2D: shell_destroy (ivi-shell.c:359) by 0x4AF059A: weston_signal_emit_mutable (signal.c:62) Address 0x174202d0 is 0 bytes inside a block of size 152 free'd at 0x484617B: free (vg_replace_malloc.c:872) by 0x4AE5EDC: weston_desktop_destroy (libweston-desktop.c:97) by 0x63F3CF2: shell_destroy (ivi-shell.c:355) by 0x4AF059A: weston_signal_emit_mutable (signal.c:62) by 0x4ACBC2C: weston_compositor_destroy (compositor.c:8629) by 0x4864A4B: wet_main (main.c:3908) by 0x10915D: main (executable.c:33) Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit eb755cd8)
ac059500