Pekka Paalanen [Fri, 25 Oct 2019 10:57:10 +0000 (13:57 +0300)]
compositor: add test suite data
Allow to set and get one opaque pointer. The test suite will then use this to
pass data from the test runner to the test plugin, so that the plugin can then
run what it needs to. This is useful when the test runner calls wet_main()
directly instead of forking a compositor.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leandro Ribeiro [Mon, 27 Jan 2020 22:12:01 +0000 (19:12 -0300)]
libweston: fold weston_compositor_tear_down() into weston_compositor_destroy()
The only reason why we have both weston_compositor_tear_down() and
weston_compositor_destroy() is that the only we had to destroy
the log context was keeping weston_compositor alive and calling
weston_log_ctx_compositor_destroy().
After commit "weston-log: replace weston_log_ctx_compositor_destroy()
by weston_log_ctx_destroy()", it's not necessary to keep a zombie
weston_compositor just to be able to call
weston_log_ctx_compositor_destroy().
Fold weston_compositor_tear_down() into weston_compositor_destroy(),
as this split is useless now.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Fri, 24 Jan 2020 04:12:59 +0000 (01:12 -0300)]
weston-log: replace weston_log_ctx_compositor_destroy() by weston_log_ctx_destroy()
The function weston_log_ctx_compositor_destroy(), which destroys struct
weston_log_context, takes weston_compositor as argument. We may have a
weston_log_context unlinked from a weston_compositor and currently there
is no way to destroy it.
Add function weston_log_ctx_destroy(), what makes the destruction of
weston_log_context independent of weston_compositor.
With this change, one could destroy a weston_compositor and keep the
related weston_log_context (since now weston_log_context can be destroyed
without the need of a weston_compositor). But if weston_compositor gets
destroyed it's also necessary to destroy weston_log_context::global,
as the debug protocol depends on the compositor. So a listener has been
added to the destroy signal of weston_compositor.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Fri, 17 Jan 2020 14:19:59 +0000 (11:19 -0300)]
weston-log: rename weston_log_ctx_compositor_create() to weston_log_ctx_create()
Since weston_log_ctx_compositor_create() does not have any relation
with weston_compositor, rename it to weston_log_ctx_create().
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Fri, 17 Jan 2020 13:47:49 +0000 (10:47 -0300)]
weston-log: fold weston_log_ctx_compositor_setup() into weston_compositor_create()
The function weston_log_ctx_compositor_setup() is being called only inside
weston_compositor_create() and it is so tiny that the code gets easier to
follow if it gets folded in weston_compositor_create().
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Marius Vlad [Thu, 5 Dec 2019 12:09:58 +0000 (14:09 +0200)]
clients/simple-dmabuf-v4l: Dmabuf-contiguous for vivid module
For certain cases when using vivid module, some display-controllers
require to allocate the dmabuf in a contiguous fashion so explain that
to the user when adding details about vivid module.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 20 Nov 2019 22:28:31 +0000 (00:28 +0200)]
clients/simple-dmabuf-v4l: Add 'weston-direct-display' protocol
Makes use of weston-direct-display protocol to pass the dmabuf
straight to the display-controller if such a path is possible.
Removes the Y_INVERT flag in case that was passed, and notifies
the user about it, as the weston implementation would force going
through the renderer when passing the Y_INVERT flag, but in the same
time direct-display avoids any GPU import so having them both in the
same time would result into weston refusing the create a buffer.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 20 Nov 2019 21:44:20 +0000 (23:44 +0200)]
clients/simple-dmabuf-v4l: Add Y_INVERT option flag
Allow clients to pass Y_INVERT, not only when v4l reports it so.
Document it briefly and add a note about this Y_INVERT flag is passed
if the camera sensors is detected as being y-flipped.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 20 Nov 2019 21:10:22 +0000 (23:10 +0200)]
clients/simple-dmabuf-v4l: Convert to use getopt_long
Makes adding further flags/options/args much easier.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Tue, 22 Oct 2019 10:36:37 +0000 (13:36 +0300)]
clients/dmabuf-v4l: Pass FLAGS_Y_INVERT to linux-dmabuf if v4l2 reports so
Zero-initialize the display as to correctly pass the options if it was
supplied (@emersion).
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Tue, 22 Oct 2019 10:13:28 +0000 (13:13 +0300)]
client/dmabuf-v4l: Use zwp_linux_dmabuf version 3
We're missing format checks and still using first version of
zwp_linux_dmabuf protocol. Use the latest release and check that the
advertised formats/modifier accepts the user-supplied requested DRM
format.
Accept the format only if the modifier is LINEAR (@emersion).
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Pekka Paalanen [Mon, 9 Dec 2019 11:03:02 +0000 (13:03 +0200)]
xwm: always configure on send_configure()
There is more state than just the application window width and height that
affects whether calling weston_wm_window_configure() is necessary: everything
that affects the frame window, fullscreen state in particular. Therefore do not
skip the call by just width and height.
If send_configure() happens to be called "unnecessarily", this will now forward
some of those calls to the X11 clients. However, since it uses an idle task, it
should not result in a flood at least. And if send_configure() is spammed,
maybe that should then be fixed in its callers.
This patch should fix the misplacement of a fullscreen X11 window due to the
frame window being incorrectly sized and positioned, and the app window
incorrectly positioned inside the frame window.
The fullscreen window problems were observed in a case where the window does
not hit legacy_fullscreen() but first maps and then sets
_NET_WM_STATE_FULLSCREEN. Additionally the initial window size must match the
output size where it gets fullscreened. In that case the frame window was left
as if not fullscreened.
This practically reverts
3f53d9179bcdb11d053527336ac4a49f274bc8d1. I'm not sure
what problem that patch was fixing, but I couldn't make any resizing freeze.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 5 Dec 2019 14:47:16 +0000 (16:47 +0200)]
xwm: do not configure frame window None
Spotted this in debug log:
[xwm-wm-x11] XWM: configure window 4194324: x=32 y=32 width=1920 height=1080 border_width=0 stack_mode=0
[xwm-wm-x11] XWM: configure window 0: width=1984 height=1144
Trying to configure window 0 makes no sense. So do not try.
To avoid patching two different places with the same thing, refactor the code
into a common helper.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 5 Dec 2019 14:42:48 +0000 (16:42 +0200)]
xwm: remove configure_source on destroy
It would lead to use-after-free if there was a pending idle callback to
weston_wm_window_configure() when the weston_wm_window gets destroyed. Make
sure the callback will not fire.
Found by inspection.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 5 Dec 2019 14:36:17 +0000 (16:36 +0200)]
xwm: remove configure_source on dispatch
This function is called also directly from weston_wm_window_set_toplevel(). If
configure_source is set at that point, simply resetting the pointer will "leak"
the source until it fires and calls this function again.
Let's keep the variable up-to-date by removing the source when called,
dispatched or not. This removes the second call. I only hope it doesn't cause
issues. This is also necessary if we intend to remove the source on window
destruction too.
Found by inspection.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 4 Dec 2019 10:47:12 +0000 (12:47 +0200)]
xwm: fix initially-fullscreen windows
It looks like commit
ad0da4596d6315b18e888af75eee0a9bad1ff44d introduced a bug
for X11 windows that are initially fullscreen by adding code to the end of
xserver_map_shell_surface() while ignoring the 'return' that this patch
removes. That may have caused some annoying window state issues, but the
problem became more pronounced with
7ace831ca6205ea288e49fdbd6b63f53e73fae59
when used with an Xwayland version that honours _XWAYLAND_ALLOW_COMMITS.
In the latter case, there is a possiblity the window will never show up, as XWM
forgets to set allow_commits=true. However, the window may sometimes actually
show up due to an oversight in Xwayland: the Present code may be flipping the
window buffers and not checking _XWAYLAND_ALLOW_COMMITS if it is supposed
commit at all.
Since then,
f568968f8a30eab6bfd8a15518014deb8f6c81d5 added more places where
allow_commits is set to true, masking the window-does-not-show-up issue. Window
pending state likely still remained an issue.
This patch properly fixes the "window never appears" issue by making sure
allow_commit=true is set. At the same time, it ensures the pending state
functions are called at the end of xserver_map_shell_surface(), which may fix
some window state issues like misplaced decorations and/or position of
initially-fullscreen windows. Unfortunately, it certainly does not fix all such
state problems.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leandro Ribeiro [Thu, 26 Dec 2019 19:46:16 +0000 (16:46 -0300)]
xwayland: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 26 Dec 2019 19:44:56 +0000 (16:44 -0300)]
pipewire: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 26 Dec 2019 19:41:09 +0000 (16:41 -0300)]
content-protection: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 26 Dec 2019 19:35:49 +0000 (16:35 -0300)]
compositor: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 26 Dec 2019 19:23:43 +0000 (16:23 -0300)]
backend-drm: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 26 Dec 2019 19:03:04 +0000 (16:03 -0300)]
weston-log: add function to avoid direct access to compositor members in non-core code
If we use the function weston_log_context_add_log_scope()
in non-core code, it's necessary to access
weston_compositor::weston_log_ctx.
This is not ideal, since the goal is to make core structs
(weston_compositor, weston_surface, weston_output, etc)
opaque.
Add function weston_compositor_add_log_scope(), so non-core
users are able to pass weston_compositor as argument instead
of weston_compositor::weston_log_ctx.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 18 Dec 2019 18:21:03 +0000 (15:21 -0300)]
weston-log: rename the confusing function name weston_compositor_add_log_scope()
There's a function named weston_compositor_add_log_scope()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_ctx_add_log_scope(), as
the log_scope is being added to a log_context.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Guillaume Champagne [Sun, 26 Jan 2020 23:24:44 +0000 (18:24 -0500)]
meson: add -Wmissing-prototypes to the build
Meson's warning level maps to -Wall, -Wextra and -Wpedantic.
-Wmissing-prototypes is added by neither of those flag. Consequently,
it is manually added to the build command line arguments.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Guillaume Champagne [Tue, 28 Jan 2020 01:14:29 +0000 (20:14 -0500)]
libweston: add missing include
Fixes missing prototypes compilation warnings emitted when a function
is defined before its prototype is declared.
These warnings were introduced over time since the switch to meson
because the -Wmissing-protoypes was not included in the compilation
arguments.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Guillaume Champagne [Tue, 28 Jan 2020 01:12:16 +0000 (20:12 -0500)]
window: fix missing prototypes warning
Declare touch_handle_shape and touch_handle_orientation as static
functions as they are local to window.c.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Guillaume Champagne [Tue, 28 Jan 2020 01:08:15 +0000 (20:08 -0500)]
launcher: move weston_environment_get_fd
weston_environment_get_fd was declared in weston-launch and implemented
in compositor.c. Since the function is not used elsewhere in the code,
it is replaced by a static function in launcher-weston-launch.c
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
Scott Anderson [Tue, 28 Jan 2020 04:18:33 +0000 (17:18 +1300)]
Fix Wmaybe-uninitialized warnings
Just a couple of places which shouldn't be possible, so initialized and
added assertions to make sure.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Leandro Ribeiro [Wed, 18 Dec 2019 18:52:18 +0000 (15:52 -0300)]
weston-log: rename the confusing function name weston_compositor_log_scope_destroy()
There's a function named weston_compositor_log_scope_destroy()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_scope_destroy(), as the argument is a
struct weston_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 18 Dec 2019 18:21:03 +0000 (15:21 -0300)]
weston-log: rename the confusing function name weston_compositor_add_log_scope()
There's a function named weston_compositor_add_log_scope()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_ctx_add_log_scope(), as
the log_scope is being added to a log_context.
Also, bump libweston_major to 9.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Thu, 26 Dec 2019 15:44:06 +0000 (12:44 -0300)]
weston-log: rename a confusing parameter name in weston_log_subscription_printf()
In the function weston_log_subscription_printf() we have
a struct weston_log_subscription parameter that in the .c file
is named sub. In the .h, the same parameter is named scope.
This is confusing, since its type is not struct weston_log_scope,
but struct weston_log_subscription.
Rename the parameter in the .h to sub.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 18 Dec 2019 17:52:23 +0000 (14:52 -0300)]
weston-log: rename a confusing parameter name in weston_compositor_add_log_scope()
In the function weston_compositor_add_log_scope() we have
a struct weston_log_context parameter that in the .c file
is named log_ctx. In the .h, the same parameter is named
compositor. This is confusing, since its type is not
struct weston_compositor, but struct weston_log_context.
Rename the parameter in the .h to log_ctx.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Pekka Paalanen [Thu, 16 Jan 2020 15:44:51 +0000 (17:44 +0200)]
doc: output management sequence diagrams
When we were designing the libweston output API, I wrote a design document
as a Phabricator wiki page. Phabricator is no longer accessible so that
information needs to be migrated to a new place. Here I am converting most of
it into libweston Sphinx documentation, particularly pulling in the sequence
diagrams I drew. This should help people understand how libweston output
configuration works.
The diagrams are committed as both MSC source files and rendered PNG files. I
did not bother tinkering with the build to run mscgen automatically and then
with the CI images to install the tool.
The Sphinx configuration need numref explicitly enabled so that figures are
automatically numbered and can be referenced by their number rather than their
whole caption text(!).
The document structure is changed a little better flowing with Output
Management being the overview page and the Heads and Outputs being the API
pages.
First I wrote the struct weston_output and weston_head descriptions in Doxygen
comments in libweston.h, but then in the API page that text would have been
buried somewhere towards the end of the page. So I put that text in ReST
instead where it comes as first on the pages as it should. The doc for the
structs only contain a link to the top of the page. Yes, the comment style in
libweston.h is a little broken. If I left the asterisk there it would show up
as a bullet point in Sphinx. OTOH putting everything from \rst in a single line
did not produce anything.
Because Sphinx cannot look in two places, the images need to be copied into the
build dir too.
mscgen: http://www.mcternan.me.uk/mscgen/
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/25
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Mon, 27 Jan 2020 10:15:20 +0000 (12:15 +0200)]
tests: test-runner needs wayland-client
weston-test-runner.h includes wayland-util.h, therefore it needs
wayland-client. A partial dependency with just compile_args might have been
enough as it does not seem to use functions from wayland-util.c, but safer this
way and no harm.
Fixes: https://lists.freedesktop.org/archives/wayland-devel/2020-January/041149.html
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Simon Ser [Fri, 24 Jan 2020 20:20:02 +0000 (21:20 +0100)]
build: re-open master for regular development
Simon Ser [Fri, 24 Jan 2020 20:04:40 +0000 (21:04 +0100)]
build: bump to version 8.0.0 for the official release
Pekka Paalanen [Fri, 24 Jan 2020 13:11:13 +0000 (15:11 +0200)]
build: avoid Xlib.h via EGL headers
This should make EGL headers not pull in Xlib headers when no specific platform
define is in effect.
Use both the old Mesa-specific hack and the new official define EGL_NO_X11 to
have this work on both old and new EGL headers.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/350
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Veeresh Kadasani [Fri, 24 Jan 2020 08:18:44 +0000 (17:18 +0900)]
ivi-application: fix typo
Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
Simon Ser [Fri, 17 Jan 2020 22:18:24 +0000 (23:18 +0100)]
build: bump to version 7.0.93 for the RC1 release
Marius Vlad [Fri, 17 Jan 2020 10:32:55 +0000 (12:32 +0200)]
desktop-shell: Do not try to add a child to a non-existent parent
Introduced with
a8da2084, it seems that there are cases when there's no
parent available (zenity, for instance).
Removes any potential child and re-initialize it, in case the parent is
not set. (Simon Ser)
Fixes: #340
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reported-by: n3rdopolis <bluescreenavenger@gmail.com>
Stefan Agner [Thu, 20 Jun 2019 20:54:54 +0000 (22:54 +0200)]
backend-rdp: unref keymap after associating with seat
The function weston_seat_init_keyboard makes sure that it has its
own reference to keymap, hence we can safely drop our reference.
This is similarly done in the X11 backend. It avoids leaking a
struct xkb_keymap per connection.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 20 Jun 2019 20:45:49 +0000 (22:45 +0200)]
backend-rdp: use compositor wide struct xkb_context
Instead of allocating our own copy of struct xkb_context use the
compositor wide instance. This avoids leaking of a struct
xkb_context per connection as well.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 20 Jun 2019 20:45:02 +0000 (22:45 +0200)]
backend-rdp: constify keyboard layout information
Those information remain constant during execution, so mark them
as const.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 20 Jun 2019 15:39:36 +0000 (17:39 +0200)]
backend-rdp: disconnect and free peers on compositor shutdown
Properly disconnect and free all RDP peers on compositor shutdown.
This makes sure that all events are disabled, which should avoid
any race conditions with pending events.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Thu, 20 Jun 2019 15:34:00 +0000 (17:34 +0200)]
backend-rdp: unregister events before shuting down compositor
Like the other backends we should unregister events before
shutting down the compositor.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Sun, 23 Jun 2019 12:53:59 +0000 (14:53 +0200)]
desktop-shell: make sure child window stays active
If a xdg_toplevel surface has a child (or multiple), the desktop shell
still allows to activate the parent. This can be problematic with
modal dialogs such as message boxes which then are hidden behind the
main window, which might be non-responsive to inputs at this this
point.
The protocol specifies set_parent as follows: "Set the 'parent' of
this surface. This surface should be stacked above the parent surface
and all other ancestor surfaces."
Track parent/child relationship in desktop-shell. Follow the protocol
recommendation and make sure the child stays stacked above the parent.
Fixes: #231
Signed-off-by: Stefan Agner <stefan@agner.ch>
Simon Ser [Fri, 20 Dec 2019 17:39:33 +0000 (18:39 +0100)]
build: bump to version 7.0.92 for the beta release
Michael Forney [Wed, 18 Dec 2019 10:54:39 +0000 (02:54 -0800)]
clients/presentation-shm: Add missing dependency on xdg-shell protocol
Signed-off-by: Michael Forney <mforney@mforney.org>
Leandro Ribeiro [Fri, 13 Dec 2019 03:05:09 +0000 (00:05 -0300)]
backend-rdp: report a zero physical size to compositor
The RDP-backend is reporting a non-zero physical size
value, and there are some clients that get the resolution
in pixels directly from the physical size reported. This
leads to a resolution of 25.4 PPI (or 1px/1mm), which is too
small.
But there's no need for that. The physical size is reported
on enabling the output (in the case of RDP-backend we have
no information about it before this), and the resolution is
already set in this moment.
Report a zero physical size to compositor, what makes frontend
and clients use their default values and applications become
readable.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Pekka Paalanen [Wed, 11 Dec 2019 11:12:52 +0000 (13:12 +0200)]
gitlab-ci: install xwayland
The reason the Xwayland test skips is that Xwayland was not installed. We
should exercise Xwayland as well in CI, so install it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 21 Nov 2019 13:04:28 +0000 (15:04 +0200)]
gitlab-ci: wrap and alphabetize apt-get line
This line is far too long, it makes it really had to see in a diff what
changed. Wrap it into multiple lines and sort them alphabetically. If a piece
of it changes in the future, it will be easy to see in a diff.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 21 Nov 2019 13:03:03 +0000 (15:03 +0200)]
gitlab-ci: image build should fail on failed commands
Ensure that no command in the script fails silently. If any command fails, the
image is likely broken.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 5 Dec 2019 14:09:11 +0000 (16:09 +0200)]
xwm: debug ConfigureWindow
Print all ConfigureWindow messages XWM sends. Helps debugging XWM why
fullscreening doesn't work right.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Thu, 12 Dec 2019 11:20:24 +0000 (13:20 +0200)]
xwm: xcb_configure_window() takes uint16_t
The mask argument is uint16_t so declare the variable with the same.
Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Wed, 4 Dec 2019 13:00:43 +0000 (15:00 +0200)]
xwm: debug what kind decoration is drawn
Knowing the kind of decoration drawn will help track down issues with
unexpected decorations.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Tue, 3 Dec 2019 14:23:45 +0000 (16:23 +0200)]
xwm: debug _XWAYLAND_ALLOW_COMMITS
Print the changes to the debug scope, helping to figure out why Xwayland is or
is not committing.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Tue, 3 Dec 2019 13:40:05 +0000 (15:40 +0200)]
xwm: add newline to cardinal array
Add the missing newline to printing a property that is of type cardinal array.
Fixes messed up debug scope output.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Thu, 5 Dec 2019 13:07:56 +0000 (15:07 +0200)]
clients/simple-dmabuf-egl: Add some notes when using direct-display
protocol
As dmabuf uses a different coordinate (top-left) system than OpenGL
(bottom-left) using both direct-display with the Y_INVERT dmabuf attrib
flag would result in the image being inverted (direct-display will
remove the Y_INVERT flag, which caused the image to be displayed
correctly). Notifies users that direct-display is in use.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leandro Ribeiro [Tue, 3 Dec 2019 21:32:05 +0000 (18:32 -0300)]
screen-share: define variable type before using as function argument
Define the void pointer as pixman_region32_t instead of using it
directly.
Void pointers are used by generic API's so each user can define
a data type as needed. Not doing this is dangerous, since void
pointers implicitly cast from/to any pointer without giving
warnings. So we must define its type instead of using it directly
in a function call.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Emmanuel Gil Peyrot [Mon, 9 Dec 2019 01:50:55 +0000 (02:50 +0100)]
backend-drm: Make boolean fields actually bool
Continues what
dd8219b3fb4280bab83b4ab29ce58bac6db3c443 started, also in
the DRM backend.
Emmanuel Gil Peyrot [Mon, 9 Dec 2019 01:36:42 +0000 (02:36 +0100)]
backend-drm: Remove unused variable
Its last usage was removed in
31838bf17e3a5a5e39e25700496c7f8315ecab42.
Leandro Ribeiro [Wed, 4 Dec 2019 17:48:27 +0000 (14:48 -0300)]
clients/window: drop support for rgb565
Remove member preferred_format from struct window and hardcode
ARGB32 pixel format for clients/window.
The member preferred_format was first added to allow hinting
of a preference for RGB565 when creating a window. But it is
not being used for a long time now. So it's safe to remove it
from the code, dropping support for RGB565 in clients/window.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Daniel Stone [Wed, 11 Dec 2019 15:22:24 +0000 (15:22 +0000)]
CI: Bump ci-templates dependency for working pip
wayland/ci-templates!18 allows the $HOME environment variable to
propagate into the execution of creating our build container. Without
that, buildah would leave us with an empty $HOME, which would have pip
install into /.local/bin.
As $HOME is preserved during our actual native builds, we would try to
find meson in /root/.local/bin and fail, since it had been stored to a
different path.
Bump the ci-templates dependency to one with the fix so we can build new
images again.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Stefan Agner [Mon, 9 Dec 2019 12:06:36 +0000 (13:06 +0100)]
backend-drm: Define potentially missing aspect-ratio bit definitions
The aspect ratio definitions for 64:27 and 256:135 have been added with
libdrm 2.4.95. However, Weston currently depends on libdrm 2.4.89 or
higher. Define the definitions in Weston to support libdrm older than
2.4.95.
Fixes: #332
Fixes:
6093772f45a4 ("backend-drm: Use aspect-ratio bit definitions from libdrm")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Mon, 9 Dec 2019 12:26:57 +0000 (13:26 +0100)]
renderer: change all frame_signal emission to pass previous_damage
Commit
adaf8c7410da ("renderer: change frame_signal emission to pass
previous_damage as data argument") missed updating all frame_signal
emissions. Later commit
2619bfe420 ("move frame_signal emission to
weston_output_repaint()") fixed this deficency along with moving the
location of the emission. Due to an issue of the location change, this
commit had to be reverted again.
This makes sure that the pixman as well as the GL renderer now also
emits the damage region instead of the Weston output.
Fixes:
adaf8c7410da ("renderer: change frame_signal emission to pass previous_damage as data argument")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Simon Ser [Fri, 6 Dec 2019 19:30:51 +0000 (20:30 +0100)]
build: bump to version 7.0.91 for the alpha release
Leandro Ribeiro [Fri, 29 Nov 2019 02:04:46 +0000 (23:04 -0300)]
libweston: remove previous_damage from struct weston_output
The member previous_damage from struct weston_output is no longer necessary.
First, stop calling init, fini and copying output_damage to it. Then remove
it from struct weston_output.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Marius Vlad [Tue, 3 Dec 2019 16:03:42 +0000 (18:03 +0200)]
gitlab-ci: Update ci-templates to latest SHA commit
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Leandro Ribeiro [Tue, 3 Dec 2019 15:22:11 +0000 (12:22 -0300)]
Revert "move frame_signal emission to weston_output_repaint()"
The emission of frame_signal has to happen before a flip, otherwise
glReadPixels() could read an old frame or even worse an uninitialized buffer.
So move frame_signal emission back to renderers.
This reverts commit
2619bfe420c493b0adef57cf2f57b3b5fe7d7078.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Simon Ser [Mon, 2 Dec 2019 09:43:06 +0000 (10:43 +0100)]
clients: remove leftover from simple-dmabuf-drm
This header is not used anymore.
Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes:
0a4f6e7d6d63 ("clients: drop simple-dmabuf-drm")
Reported-by: Marius Vlad <marius.vlad@collabora.com>
Link Mauve [Sat, 30 Nov 2019 22:16:22 +0000 (22:16 +0000)]
xwayland: Remove unused variable
Daniel Stone [Tue, 26 Nov 2019 00:32:22 +0000 (00:32 +0000)]
option-parser: Make bools boolean
When option-parser is confronted with a boolean option, have it write a
bool rather than treating the value as a pointer to an int32.
(lib)weston already heavily uses bool types internally, so this has the
nice side effect of eliminating quite a few local variables which only
existed as integer shadows of internal boolean variables.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Tue, 26 Nov 2019 00:16:35 +0000 (00:16 +0000)]
tests/config-parser: Remove useless duplicate test
test012 and test013 were exact duplicates of each other: asserting that
they could successfully look up a single boolean value.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Tue, 26 Nov 2019 00:14:24 +0000 (00:14 +0000)]
config-parser: Make get_bool be bool
Wayland innovated a lot of cool things, but non-binary boolean values is
the great advances of our time.
Make config_parser_get_bool() work on boolean values, and switch all its
users.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Simon Ser [Tue, 16 Jul 2019 12:18:25 +0000 (15:18 +0300)]
clients: drop simple-dmabuf-drm
This client contains driver-specific code to allocate buffers. However clients
shouldn't contain driver-specific code and should rely on e.g. mesa to allocate
buffers via standard interfaces.
Additionally, because the build system always tries to enable all features, some
experimental drivers and drivers that aren't included in amd64 distribution
packages were required. Users would need to manually disable some drivers.
Releasers would need to install libdrm from source (because the release process
forbids adding custom build flags). Dropping simple-dmabuf-drm simplifies both
building and releasing.
The functionality previously tested via simple-dmabuf-drm can now be tested with
simple-dmabuf-egl.
Signed-off-by: Simon Ser <contact@emersion.fr>
Daniel Stone [Tue, 26 Nov 2019 10:48:12 +0000 (10:48 +0000)]
backend-drm: Use aspect-ratio bit definitions from libdrm
When the aspect-ratio-aware mode support was added to Weston, it was
done before the libdrm support was finalised and merged. Between it
being added to Weston and being merged, it changed to no longer provide
the offset for the bitmask.
Instead of using the mask and a compatible enum, if we update our
libdrm dependency, we can use the flag definitions directly from libdrm.
In
94e4068ba171, the libdrm dependency was bumped to 2.4.83, which
enabled us to remove a bunch of error-prone ifdefs by making atomic and
modifier support mandatory.
We determined in the discussion of !311 that it was safe to push the
dependency as high as 2.4.91, as that was what was available in major
distributions.
Bumping to 2.4.86 allows us to safely remove the ifdef and go with
upstream flags, as that was added in mesa/drm@
0d889201d106.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Leandro Ribeiro [Wed, 27 Nov 2019 16:43:02 +0000 (13:43 -0300)]
screen-share: get previous_damage from data argument instead of weston_output
Instead of getting previous_damage from the weston_output struct, get it from
the frame_signal data argument. This will make possible to remove
previous_damage from weston_output after we decide what to do with
output->previous_damage usage in DRM backend.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 27 Nov 2019 16:02:24 +0000 (13:02 -0300)]
screenshooter: get previous_damage from data argument instead of weston_output
Instead of getting previous_damage from the weston_output struct, get it from
the frame_signal data argument. This will make possible to remove
previous_damage from weston_output after we decide what to do with
output->previous_damage usage in DRM backend.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 27 Nov 2019 14:20:47 +0000 (11:20 -0300)]
renderer: change frame_signal emission to pass previous_damage as data argument
This will make possible to users that are listening to frame_signal to get
previous_damage from the data parameter instead of using
output->previous_damage.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 27 Nov 2019 15:47:19 +0000 (12:47 -0300)]
tests: stop using frame_signal 'void *data' argument to get weston_output
Instead of getting weston_output from the frame_signal argument 'void *data',
add weston_output in the private data struct of the users that are listening
to frame_signal. With this change we are able to pass previous_damage as the
data argument.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Wed, 27 Nov 2019 15:43:01 +0000 (12:43 -0300)]
screenshooter: stop using frame_signal void *data parameter to get weston_output
Instead of getting weston_output from the frame_signal argument 'void *data',
add weston_output in the private data struct of the users that are listening
to frame_signal. With this change we are able to pass previous_damage as the
data argument.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Mon, 25 Nov 2019 15:31:46 +0000 (12:31 -0300)]
move frame_signal emission to weston_output_repaint()
In order to remove duplication and make the code easier to follow, move
frame_signal emission from renderers to weston_output_repaint(). This should
have no observable effect.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Vivek Kasireddy [Thu, 21 Feb 2019 01:28:48 +0000 (17:28 -0800)]
gl-renderer: Add support for XYUV format (v2)
Accept XYUV dmabuf buffers that a client application such as
weston-simple-dmabuf-v4l might submit.
v2 (Daniel):
Add XYUV to yuv_formats array to have the compositor color convert
with a shader if GL_TEXTURE_EXTERNAL_OES does not work.
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Vivek Kasireddy [Wed, 24 Apr 2019 22:40:47 +0000 (15:40 -0700)]
gl-renderer: Replace EGL_*_WL macros with locally defined enums
Instead of using the EGL_*_WL macros imported from EGL headers,
start using enums that would be defined locally. This is needed as
there are limited number of macros defined in EGL headers and
adding new ones is not practically feasible when adding a new
texture type. (suggested by Daniel Stone)
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Harish Krupo [Tue, 11 Dec 2018 08:29:07 +0000 (13:59 +0530)]
desktop-shell: Set 1x1 buffers for solid-color backgrounds
When we are going to set a solid color for the background, use
a 1x1 buffer and set the viewport to the full size. This avoids
un-necessary allocation of buffer memory.
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Harish Krupo [Tue, 11 Dec 2018 08:15:43 +0000 (13:45 +0530)]
clients/window: Add viewport destination support
Add support for setting the widget's destination wp viewport.
Setting it in the widget instead of being set directly by the client
ensure that the widget can be identified in widget_find_widget.
v2: Return -1 on error (Pekka)
Scale allocated x and y when viewport is set (Pekka)
Allow user to set -1 for viewport width and height (Pekka)
v3: Use NULL instead of 0 (Daniel)
return 0 if width and height are -1 (Daniel)
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Marius Vlad [Sun, 25 Aug 2019 19:33:41 +0000 (22:33 +0300)]
clients/fullscreen: Refuse to resize the surface size when fullscreen'ed
This would be causing a protocol error in which the buffer size needs to
match the one provided in the configure event.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Fri, 19 Jul 2019 08:29:53 +0000 (11:29 +0300)]
doc/scripts/gdb: Added gdb script to dump contents of the flight recorder
Mimics the C version that displays the contents of the flight recorder.
With a core-dump in place source the python file then call
'display_flight_rec' to dump the data.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 7 Aug 2019 14:21:49 +0000 (17:21 +0300)]
weston-log-flight-rec: Fix useless comparison when displaying the
contents of the flight recorder
The overlap variable is sufficient to determine from where to start
displaying the contents of the ring buffer. Also redundant to verify
if the position in the buffer went over the maximum size.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Wed, 7 Aug 2019 14:18:37 +0000 (17:18 +0300)]
weston-log-flight-rec: Don't allow more than one flight recorder to be
created
Having a (single) global variable which others depend on it implies
having a single flight recorder present. Until we have a reason to
support multiple flight recorders limit the amount to a maximum of one.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Thu, 18 Jul 2019 14:04:37 +0000 (17:04 +0300)]
weston-log-flight-rec: Add a global variable to access the ring buffer
With it add also a function which can be used in an assert()-like
situation to display the contents of the ring buffer. Within gdb
this call also be called if the program is loaded/still loaded into
memory.
The global variable will be used in a later patch to be accessed from a
python gdb script.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Veeresh Kadasani [Fri, 15 Nov 2019 05:37:16 +0000 (14:37 +0900)]
simple-dmabuf-egl: make application generic
Don't exit if EGL_KHR_no_config_context extension
is not supported
Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
Daniel Stone [Mon, 25 Nov 2019 10:30:11 +0000 (10:30 +0000)]
config-parser: Export get_full_path and destroy
Make sure we export the get_full_path() accessor (declared in the
header, used by Weston itself) and the parser's destroy function.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Mon, 25 Nov 2019 11:11:56 +0000 (13:11 +0200)]
libweston: do not include weston.h
Libweston is not allowed to depend on Weston. Fortunately this include is
unnecessary and can be simply removed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Leandro Ribeiro [Sat, 23 Nov 2019 16:15:52 +0000 (13:15 -0300)]
backend-drm: remove unnecessary ifdefs
Remove unnecessary ifdefs for DRM_MODE_CONNECTOR_DSI, DRM_MODE_CONNECTOR_DPI.
They are both provided by libdrm and were introduced long before 2.4.83 (the
lowest version we currently support).
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Fri, 22 Nov 2019 19:55:56 +0000 (16:55 -0300)]
backend-drm: remove unecessary ifdef checks
Since commit
28d26483 ("build: bump libdrm requirement to newer version
(2.4.83)"), all supported libdrm versions provide modifier formats,
atomic API and blob formats. Remove ifdef checks (HAVE_DRM_ADDFB2_MODIFIERS,
HAVE_DRM_ATOMIC, HAVE_DRM_FORMATS_BLOB) to improve the code and make it
simpler.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Leandro Ribeiro [Fri, 22 Nov 2019 17:45:33 +0000 (14:45 -0300)]
build: bump libdrm requirement to newer version (2.4.83)
There are some features that are available only if the user's libdrm version is
not too old: format modifiers require at least libdrm 2.4.71, atomic API at
least 2.4.78 and blob formats at least 2.4.83.
Bump libdrm to 2.4.83 (the oldest version that support these features) in order
to be able to remove ifdef checks and simplify the code. Major distributions
already support libdrm 2.4.91, so it's safe to apply this commit.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Marius Vlad [Fri, 15 Nov 2019 12:11:49 +0000 (14:11 +0200)]
backend-drm: Further checks to skip plane assignment to HW planes
Mode change from mixed-mode to renderer-only means we should no longer
try to place views in HW planes (as we composite everything into the
primary plane) thus we should avoid that whenever that happens.
In the same time we need to be able to place in mixed-mode/renderer-only
mode the cursor view into the cursor plane (if one is available).
This patch adds a further check to skip plane assignment when disabling
overlay support (when we switch to renderer-only mode), when drivers do
not have atomic-modeset or it has been disabled intentionally.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Fri, 15 Nov 2019 12:32:08 +0000 (14:32 +0200)]
backend-drm: Turn zpos duplicate check into an hard assert
This way we make sure we find out (if we have assigned invalid zpos
values) much faster.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Thu, 14 Nov 2019 22:25:11 +0000 (00:25 +0200)]
backend-drm: Skip testing plane state if plane is not enabled
Adds a further assert() to make sure we're not checking against invalid
values. This was seen in the wild when the kernel rejects the commit for
overlay resulting in a check for invalid zpos values.
Fixes: #304
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>