- Apr 12, 2018
-
-
Pekka Paalanen authored
Duplicate these strings to decouple their lifetime from whatever the backends used. This should prevent hard to catch use after frees and such problems in the future. 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>
-
Pekka Paalanen authored
Remove the wl_resource in the head's resource list when we are removing the wl_output global. We sent global removal events to clients, the resources should become dummies until clients reap them. Reset user data so that clients triying to use dummy objects don't hit e.g. a freed head pointer. This fixes a theoretical issue: if an enabled output is disabled and then gets enabled again, mode changes and wl_surface.enter/leave would still attempt to use the dummy objects. If a client destroyed a dummy object, we don't have the destructor to remove it from the resource list, and libweston would hit freed memory. 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>
-
Pekka Paalanen authored
The intention is that in the future backends will dynamically allocate weston_heads based on the resources they have. The lifetime of a weston_head will be independent of the lifetime of a weston_output it may be attached to. Backends allocate objects derived from weston_head, like they currently do for weston_output. Backend will choose when to destroy a weston_head. For clone mode, struct weston_output gains head_list member, which is the list of attached heads that will all show the same framebuffer. Since heads are growing out of weston_output, management functions are added. Detaching a head from an enabled output is allowed to accommodate disappearing heads. Attaching a head to an enabled output is disallowed because it may need hardware reconfiguration and testing, and so requires a weston_output_enable() call. As a temporary measure, we have one weston_head embedded in weston_output, so that backends can be migrated individually to the new allocation scheme. v8: - Do not send wp_presentation_feedback.sync_output events for multiple wl_output globals in weston_presentation_feedback_present(). v6: - adapt to upstream changes in weston_output_set_transform() - use wl_list_for_each_safe in weston_output_release() - removed weston_output_get_first_head() as it's not needed yet Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> v5 Reviewed-by:
Derek Foreman <derekf@osg.samsung.com> v7 Reviewed-by:
Ian Ray <ian.ray@ge.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Derek Foreman <derekf@osg.samsung.com>
-
- Apr 10, 2018
-
-
Pekka Paalanen authored
Split out a new function. This is a pure refactoring, no change in behaviour. This helps a following patch that adds a loop over output->head_list. 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>
-
Pekka Paalanen authored
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>
-
Pekka Paalanen authored
As a wl_output represents weston_head, use a weston_head pointer as the wl_output global's user data. 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>
-
Pekka Paalanen authored
The wl_output protocol interface exposes things like monitor make, model, sub-pixel layout and physical dimensions. Obviously wl_output is meant to represent a monitor. The abstraction of a monitor is weston_head. Therefore move the wl_output global and the bound resources list into weston_head. When clone mode gets implemented in the future, this means that monitors driven by the same CRTC will still be represented as separate wl_output globals. This allows to accurately represent the hardware. Clone mode that used separate, not frame-locked, CRTCs to drive two monitors as clones would necessarily also be exposed as separate wl_output since they have different timings. v6: - adapt to upstream changes in weston_output_set_transform() 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>
-
Pekka Paalanen authored
In order to support clone modes, libweston needs the concept of a head that is separate from weston_output. While weston_output manages buffers and the repaint state machine, weston_head will represent a single monitor. In the future it will be possible to have a single weston_output drive one or more weston_heads for a clone mode that shares the framebuffers between all cloned heads. All the fields that are obviously properties of the monitor are moved from weston_output into weston_head. As moving the fields requires one to touch all the backends for all the assingments, introduce setter functions for them while we are here. The setters are identical to the old assignments, for now. As a temporary measure, weston_output embeds a single head. Also the ugly casts in weston_head_set_monitor_strings() will be removed by a follow-up patch. Libweston major version is bumped, because weston_output struct layout is changed. v7: - Bump libweston major version. v6: - adapt to upstream changes in weston_output_set_transform() Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> v5 Reviewed-by:
Derek Foreman <derekf@osg.samsung.com> v6 Reviewed-by:
Ian Ray <ian.ray@ge.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Derek Foreman <derekf@osg.samsung.com>
-
- Apr 09, 2018
-
-
Derek Foreman authored
configure won't work if weston's version is higher than libweston's.
-
Derek Foreman authored
-
Derek Foreman authored
-
- Apr 05, 2018
-
-
Daniel Stone authored
ef57a9b7 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>
-
- Apr 02, 2018
-
-
Derek Foreman authored
-
Derek Foreman authored
This (partially) reverts commit bef76179. This (partially) reverts commit 4d1cd36c. This (partially) reverts commit 44fc1be9. This (partially) reverts commit 6b58ea8c. 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>
-
- Mar 28, 2018
-
-
Derek Foreman authored
This reverts commit 332d1892. 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).
-
Derek Foreman authored
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>
-
Signed-off-by:
Emre Ucan <eucan@de.adit-jv.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
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>
-
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>
-
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>
-
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>
-
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>
-
- Mar 27, 2018
-
-
Scott Moreau authored
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>
-
- Mar 20, 2018
-
-
Pekka Paalanen authored
This reverts commit d2cb711d. 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>
-
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>
-
- Mar 19, 2018
-
-
Derek Foreman authored
-
Guido Günther authored
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>
-
Guido Günther authored
Other backends might want to use it. Signed-off-by:
Guido Günther <agx@sigxcpu.org> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
"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>
-
Signed-off-by:
Guido Günther <agx@sigxcpu.org> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Signed-off-by:
Guido Günther <agx@sigxcpu.org> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
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>
-
- Mar 16, 2018
-
-
Got renamed in f9dec679 Signed-off-by:
Guido Günther <agx@sigxcpu.org> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Signed-off-by:
Dima Ryazanov <dima@gmail.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Remove ifdef clutter and makes sure it's only called for the active backend. Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
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>
-
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>
-
This is already done when weston_output_init_geometry() is called. Actually this is a fix for 8564a0d1, 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>
-
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>
-