src/agl-compositor.git
20 months agoagl-shell: Add split functionality into agl-shell protocol sandbox/mvlad/split-v3-update
Marius Vlad [Fri, 5 Aug 2022 13:21:34 +0000 (16:21 +0300)]
agl-shell: Add split functionality into agl-shell protocol

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id19a1865baef6e7c9804a281d583a4ac19421851

20 months agoagl-shell: Add bound_ok and bound_fail events and a default destructor 59/27859/3
Marius Vlad [Wed, 3 Aug 2022 13:14:17 +0000 (16:14 +0300)]
agl-shell: Add bound_ok and bound_fail events and a default destructor

As we're increasing the amount of combinations we could have in the AGL
platforms, in which we're mixing various platforms, we require a way
to tell clients that there's already a shell client which in charge.

We can't really have multiple shell clients managing the windows and
surfaces, but in the same time we don't want to sever the wayland
connection the way it happens currently. Racy alternatives might exist,
which  avoid advertising the interface altogether once a
client did bind to the interface but that's not really a
viable solution.

So instead of doing that, this patch introduces two new events which
tells the client that it was either successful, and it can continue
issue requests and receive events or a that it the bind failed. The
client can chose to wait and try later and abandon to bind to the
agl_shell intefface, and behave like a regular client.

While doing an update to protocol to add those two events this patch add
also a default destructor for the protocol.

Bug-AGL: SPEC-4502
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iacb86a668d1c4630724eecdb18e4b4c2d4e8e34a

21 months agoFix typo in README 77/27777/1 13.93.0 needlefish/13.93.0 needlefish_13.93.0
chintsung [Mon, 18 Jul 2022 03:38:50 +0000 (11:38 +0800)]
Fix typo in README

- Fix brackets of link

Signed-off-by: chintsung <chichon.tw@gmail.com>
Change-Id: I1f96362bf02919b5bffea9977883f58dd2fa66ac

22 months agolayout: Add a wrapper for adding the view to the hidden layer 84/27684/2
Marius Vlad [Tue, 21 Jun 2022 11:13:56 +0000 (14:13 +0300)]
layout: Add a wrapper for adding the view to the hidden layer

And with it, use it *as well* when detecting a surface shouldn't be
presented if activate-by-default is disabled. The reason for doing that
is to allow application the resize and receive frame events right after
the client shell has been started.

Doing it a later point it time, right when a potential activation could
come from a client, wouldn't really be useful as the client won't react
to configure events. This particular fix is for cases where the
activate by default is disabled and the application itself was added
*before* the client shell sent the ready request.

Bug-AGL: SPEC-4423
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Change-Id: I5b08d2ff65fca28126608c2677ec9b558a34caa1

22 months agoshell: Fix a typo when adding surface to pending list 81/27681/1
Marius Vlad [Mon, 20 Jun 2022 13:16:13 +0000 (16:16 +0300)]
shell: Fix a typo when adding surface to pending list

As both names are similar this was probably a typo, and instead of using
the iterator for the list we should use the item itself. This was pretty
hard to track as initially everything was set-up alright.

We were still getting empty lists of pending remote surfaces, when I
observed that we were using the iterator rather than the new item we
just create in that function.

Bug-AGL: SPEC-4445
Reported-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I77c4c6721eb4a4e3e8e66faa4fa0584b136d322e

22 months agocompositor: Allow passing continue-without-input 89/27589/2
Marius Vlad [Wed, 1 Jun 2022 09:12:49 +0000 (12:12 +0300)]
compositor: Allow passing continue-without-input

We can specify over cmd line if we don't have any input devices.
Found while investigating xdg-shell and keyboard activation.

Bug-AGL: SPEC-4415
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I54be16e38922c5216f8075074bd1d47468ec07a3

22 months agoshell: Make sure that app_id is valid before checking it 73/27573/2
Marius Vlad [Mon, 30 May 2022 18:36:30 +0000 (21:36 +0300)]
shell: Make sure that app_id is valid before checking it

Bug-AGL: SPEC-4412
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I427c2920315b223432f273d08a69a069d66310c9

22 months agolayout: Keep track of popup state to handle activation 72/27572/2
Marius Vlad [Mon, 30 May 2022 17:17:36 +0000 (20:17 +0300)]
layout: Keep track of popup state to handle activation

Upon deactivation explicitly mark the surface as unmapped, and keep
track of the state using the enum already added for that.

Further more, at remap, we need to perform a transform update, so this
adds that as well.

Together with these changes, we now can activate/hide the pop-up window
correctly.

Bug-AGL: SPEC-4412
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4dda48dbda265d19df9c7fb4a25773afa8245cf3

22 months agocompositor: Perform activation from keybindings 95/27595/2
Marius Vlad [Wed, 1 Jun 2022 12:48:53 +0000 (15:48 +0300)]
compositor: Perform activation from keybindings

Now that we have common function that peforms surface activation
(xdg-shell and input one) use it for touch and keyboard.

Bug-AGL: SPEC-4413
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I325e33da4c48f2741a7bb8f5ac706f838f9dabc4

22 months agocompositor: Pass flags when adding keybindgs 94/27594/2
Marius Vlad [Wed, 1 Jun 2022 12:18:06 +0000 (15:18 +0300)]
compositor: Pass flags when adding keybindgs

Although we don't really use these flags make it so we
deliever them to libweston.

Bug-AGL: SPEC-4413
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Idbbf2278c5fcaf75a8ef2f89499f7815d4a9e88f

22 months agolayout: Add a way common way activate views 93/27593/2
Marius Vlad [Tue, 31 May 2022 12:40:43 +0000 (15:40 +0300)]
layout: Add a way common way activate views

We install a common function which is being used to de-couple
keyboard presence from input and xdg-shell activation. We also
also use it at surface removal/destruction.

Bug-AGL: SPEC-4413
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I2686e5a4aab3e95fbeaa4100faa2dc0051881f24

22 months agoshell: Extract some common functions 92/27592/2
Marius Vlad [Tue, 31 May 2022 11:44:49 +0000 (14:44 +0300)]
shell: Extract some common functions

For instance this exports retreiving a ivi_seat from weston_seat, and
they are useful in other parts as well.

Bug-AGL: SPEC-4413
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I838823570792761dfb5ac4beea635e843dd5cd22

22 months agoinput: Migrate ivi_seat to ivi_compositor header 91/27591/2
Marius Vlad [Sat, 19 Feb 2022 19:52:00 +0000 (21:52 +0200)]
input: Migrate ivi_seat to ivi_compositor header

We might need to retrieve the seat in from different places to make it
available.

Bug-AGL: SPEC-4413

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I76343fe6039ae088356ddc33364e917d67dd414b

22 months agoinput: Remove keyboard listener keyboard focus activation 90/27590/2
Marius Vlad [Sat, 19 Feb 2022 19:45:59 +0000 (21:45 +0200)]
input: Remove keyboard listener keyboard focus activation

This is part of the bigger series to remove the need to have a keyboard
present to activate views/surfaces. This clean-ups any keyboard
listener we had installed previously.

Bug-AGL: SPEC-4413

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iacd63a857cfe4d17c665f37dc8338cd790b7d16f

23 months agocompositor: Properly dispose of fullscreen views at shutdown 96/27596/1
Marius Vlad [Fri, 3 Jun 2022 08:56:29 +0000 (11:56 +0300)]
compositor: Properly dispose of fullscreen views at shutdown

While we can have multiple outputs, each with its own fullscreen view,
we have a layer-per-output hence we can't really call layer_fini()
in the output destruction as that what would result in an invalid
link access.

Handle those views destruction and with it, the fullscreen layer fini,
in the finalize bit where all others are handled as well.

This fixes a crash at shutdown, which could be seen when using multiple
outputs, and probably quite problematic when handling a restart.

Fixes: 43bdf9a42bac33df174d6ac7ff1ab2e15441c7b5

Bug-AGL: SPEC-4420
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I773890a24ad8ca2556c1d4ddda7f37ebae02c9de

2 years agoshell: Do not set none role for applications w/o appid 43/27443/1
Marius Vlad [Wed, 4 May 2022 08:12:54 +0000 (11:12 +0300)]
shell: Do not set none role for applications w/o appid

With commit 'layout: Send dimensions when setting up property as
fullscreen' we made so that fullscreen applications will receive the
configure event right from the beginning but that changed a bit the way
we handled applications that do not set-up an appid before doing the
initial wl_surface.commit.

Avoid doing that such that applications do not need to go through a
resize.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I91a9ab97ff5e30d3a86cda499d394c1a9fcde338

2 years agoshell: Let the output destroy handler handle layer fini 42/27442/1
Marius Vlad [Wed, 4 May 2022 06:54:20 +0000 (09:54 +0300)]
shell: Let the output destroy handler handle layer fini

This way we don't race with it. Part of 'shell: Added missing layer fini
calls'.

Bug-AGL: SPEC-4351
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I366364ba128ca1dacd3d3639a1b74b02f3ceef21

2 years agodesktop: Document the repaint schedule 41/27441/1
Marius Vlad [Wed, 4 May 2022 08:21:42 +0000 (11:21 +0300)]
desktop: Document the repaint schedule

Add some further comment why we could still potential need it.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I510cd60d5feeccf7d8b9b34fb73e0e272fac5c6a

2 years agoRevert "desktop: No need to schedule a compositor repaint" 40/27440/1
Marius Vlad [Wed, 4 May 2022 07:27:21 +0000 (10:27 +0300)]
Revert "desktop: No need to schedule a compositor repaint"

This reverts commit 8f85581e96bc71512cbef015ff12dc6441c07d9c.

I incorrectly assumed that we don't need to schedule a repaint, but
applications that do not set-up an appid would still need to go through
a resize and we need to continue to allow doing that.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I3702fa0a9c29290746250992d8921f777daa9fbf

2 years agoshell: Added missing layer fini calls 36/27436/1
Marius Vlad [Tue, 3 May 2022 15:04:14 +0000 (18:04 +0300)]
shell: Added missing layer fini calls

Newer libweston version introduced additional API to determine if we are
missing out proper destruction paths.

Bug-AGL: SPEC-4351
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I135ca463992244ae91512854c7da7004de48f72e

2 years agocompositor: Proper indentation 35/27435/1
Marius Vlad [Tue, 3 May 2022 09:27:48 +0000 (12:27 +0300)]
compositor: Proper indentation

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I010463d02a1dc71539754be24ce8c5d747a31b96

2 years agodesktop: Remove dead code 34/27434/1
Marius Vlad [Tue, 3 May 2022 08:33:10 +0000 (11:33 +0300)]
desktop: Remove dead code

Some dead code artefacts, no need to keep these in.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Idca7f858592b422a0e028ed03e10f4bb418bcb40

2 years agodesktop: No need to schedule a compositor repaint 33/27433/1
Marius Vlad [Tue, 3 May 2022 08:26:25 +0000 (11:26 +0300)]
desktop: No need to schedule a compositor repaint

Part of a larger clean-up.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I8532fb03e1911f9dc5c04fa113d2b3e2eeba4879

2 years agomeson.build: Bump up meson version 32/27432/1
Marius Vlad [Tue, 3 May 2022 07:56:24 +0000 (10:56 +0300)]
meson.build: Bump up meson version

Bump meson version requirements to a much newer version + some minor
compiler options which are handled directly by the build system.

yocto seem to use meson 0.63 so we're more than fine bumping the verison
for meson.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I69305b3b33e4919cb19ffa088b3530720f1b45c5

2 years agolayout: Inform client to resize for fullscreen roles 23/27423/2
Marius Vlad [Mon, 2 May 2022 12:05:23 +0000 (15:05 +0300)]
layout: Inform client to resize for fullscreen roles

In a previous patch we optimized sending the dimensions from the start,
but in some situations the client might set up the surface roles
*after* that happens, which might lead to issue as we are explicitly
terminating the connection if the client wasn't correctly resized by
that time.

This corrects that such that even if we perform a late set-up for the
fullscreen role, we can still tell the client to resize, and later on to
display the surface.

Bug-AGL: SPEC-4339
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I491c60c9881e99bc3201216a842782417286f0d9

2 years agolayout: Send dimensions when setting up property as fullscreen 15/27415/3
Marius Vlad [Wed, 27 Apr 2022 12:44:58 +0000 (15:44 +0300)]
layout: Send dimensions when setting up property as fullscreen

Instead of doing it at commit time, do it right after getting the xdg
toplevel surface such that clients can use it from the beginning.

This now includes fullscreen, besides regular desktop roles, and it
avoid mapping the fullscreen upon commit if the dimensions do not really
match up.

Bug-AGL: SPEC-4339
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7185b10770c69d1d6572b0bc025c4a58fe431c67

2 years agolayout: Do perform a view update transform when unmapped 76/27376/3
Marius Vlad [Wed, 13 Apr 2022 14:27:43 +0000 (17:27 +0300)]
layout: Do perform a view update transform when unmapped

We should always perform a view update transformed when the view is not
mapped -- or better said when mapping the view. Found while
investigating some certain bevahiours related to surfaces not being
activated by default.

While a dirty+surface damage is sufficient when adding views to layers,
on mapping we should also perform an transform update of the view.

Bug-AGL: SPEC-4302
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia8e8ed2c4cc165e7fd371a474d85b5fe38bd87fa

2 years agolayout: Make the view mapped at activation completion 75/27375/3
Marius Vlad [Wed, 13 Apr 2022 12:37:12 +0000 (15:37 +0300)]
layout: Make the view mapped at activation completion

Instead of tagging it various places just do it a completion phase.
Makes things a bit easier to follow/read.

Bug-AGL: SPEC-4302
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I91ad6b29a786c4c78afa8ff07d104008be7bcb84

2 years agocompositor: Rename activated_by_default to mapped 74/27374/3
Marius Vlad [Tue, 12 Apr 2022 18:05:06 +0000 (21:05 +0300)]
compositor: Rename activated_by_default to mapped

This variable is about surface being displayed, rather than being
activatred so use mapped to better reflect that.

It also makes things easier to keep track per surface about surfaces
being activated by default or not. No functional change whatsoever.

Bug-AGL: SPEC-4302
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ib0c508dff3eef593d86f259b55ff4e7087313a69

2 years agoWeston 10.0 compatibility changes
Scott Murray [Sat, 5 Feb 2022 22:07:34 +0000 (17:07 -0500)]
Weston 10.0 compatibility changes

Changes:
- Bump libweston dependencies in meson.build.
- Handle addition of another argument to the wet_main and
  weston_compositor_create functions.

Bug-AGL: SPEC-3819

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2 years agoWeston 9.0 compatibility changes
Scott Murray [Wed, 24 Feb 2021 22:09:40 +0000 (17:09 -0500)]
Weston 9.0 compatibility changes

Changes:
- Bump libweston dependencies in meson.build
- Match weston_compositor_tear_down -> weston_compositor_destroy API
  change by following what was done in weston for 9.0
- Update log context code to match API changes, based on what was
  done in weston for 9.0
- Update transform names to match weston
- Initialize a couple of structure fields to avoid failure from
  -Werror=missing-field-initializers triggered by changes in newer
  wayland.

Bug-AGL: SPEC-3819

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I48fab590eb59a1b83b0cebc3762ba730450b0e3a

2 years agoRemove the listener in the end of ivi_shell_destroy() 58/27258/2
duerpei [Thu, 17 Mar 2022 05:13:37 +0000 (13:13 +0800)]
Remove the listener in the end of ivi_shell_destroy()

Bug-AGL: SPEC-4291

Signed-off-by: duerpei <duep.fnst@fujitsu.com>
Change-Id: Ieaa78e59365c8749754117cf2587b4c72e1f1f31

2 years agoFix potential memory leak in agl-compositor 27/27227/3
duerpei [Tue, 15 Mar 2022 02:26:03 +0000 (10:26 +0800)]
Fix potential memory leak in agl-compositor

wet_main->parse_options-> .... ->strdup ->malloc
    "config_file" memory is not released
    "log"memory is not released

When agl-compositor startup parameters contain socket and modules,
the memory of socket_name and option_modules also needs to be released.
So these two pointers are also released.

Bug-AGL: SPEC-4270

Signed-off-by: duerpei <duep.fnst@fujitsu.com>
Change-Id: I0d74b92187a0779610f32e75b33ab4fca10329a5

2 years agolayout: Address all other callsites w/ dirty+surface damage 13/27213/2 12.93.0 marlin/12.93.0 marlin_12.93.0
Marius Vlad [Mon, 21 Feb 2022 12:27:28 +0000 (14:27 +0200)]
layout: Address all other callsites w/ dirty+surface damage

This is just a missing left-over 'layout: Inflict damage on all
subsurfaces'. As we have different paths for other types of surface
roles, address them as well.

Bug-AGL: SPEC-4262

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I2b68bf986ad694b0e31396edc24c54cf1dc4d834

2 years agolayout: Inflict surface damage 12/27212/2
Marius Vlad [Fri, 18 Feb 2022 11:48:59 +0000 (13:48 +0200)]
layout: Inflict surface damage

Commit 'layout: Remove explicit damage call' re-done the way we've
handled additions to the layer, removing any damage infliction to either
the plane where to view is visible. While marking the view as dirty (and
with it any other children to the that view), we still
to tell the compositor that the view being added, has suffered changes.

Bug-AGL: SPEC-4262

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If3033df36943fb466302e7907bd38f9a0703d49b

2 years agolayout: Remove left-over comment 11/27211/2
Marius Vlad [Fri, 11 Feb 2022 17:42:27 +0000 (19:42 +0200)]
layout: Remove left-over comment

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iba0cab61d20d8c92f6e179e25388c66a7d0e41f3

2 years agoFix potential memory leak 01/27201/3
duerpei [Wed, 23 Feb 2022 01:36:48 +0000 (09:36 +0800)]
Fix potential memory leak

Bug-AGL:SPEC-4257

Signed-off-by: duerpei <duep.fnst@fujitsu.com>
Change-Id: I0effc97710d9bf93f5044e22400e9ff6699a4309

2 years agomeson.build: Don't set the dependency type for wayland-scanner 02/27102/1 12.92.0 marlin/12.92.0 marlin_12.92.0
Marius Vlad [Fri, 28 Jan 2022 11:08:45 +0000 (13:08 +0200)]
meson.build: Don't set the dependency type for wayland-scanner

meson (0.53) seem to be smart enough to resolve cross-compile
dependencies without setting explicitly the dependency type.

Setting the dependency  as native results in ignoring PKG_CONFIG_PATH
and using PATH to choose and alternative pkg-config. Sourcing the
yocto/OE toolchain would result in picking the hosts pkg-config due to
modified a PATH where SDKTARGETSYSROOT is before any of the hosts paths.

Combined that with the fact that PKG_CONFIG_PATH is reset when the
dependency is se to native (why that hapens is something to further
investigate) results in not finding wayland-scanner.

Tested with both yocto/OE toolchains and native (local) builds to make
sure we can still build it and seems we're fine.

Bug-AGL: SPEC-4169

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5c4b12eff044aeb0c3ab4c18e943da4e15d6c411

2 years agoFix potential memory leak 93/27093/2
Rongrong Yuan [Thu, 20 Jan 2022 02:19:04 +0000 (10:19 +0800)]
Fix potential memory leak

Bug-AGL: SPEC-4221

Signed-off-by: Rongrong Yuan <yuanrr.fnst@fujitsu.com>
Change-Id: I30634977a3b899647a5f2faad2c70db39e97d09e

2 years agoclient/screenshooter: Compute the width/height for a single output 82/27082/1
Marius Vlad [Thu, 13 Jan 2022 17:29:21 +0000 (19:29 +0200)]
client/screenshooter: Compute the width/height for a single output

We're missing determining the buffers dimenions, so this basically adds
that.  Turns out this was introduced w/ commit 'clients/screenshooter:
Fix taking screenshot on multiple outputs'. Still clueless on how this
worked in CI, unless we're using `-a' to take a screenshot on all
outputs.

Bug-AGL: SPEC-4217

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I9a849457e9ca40f0b36e7249d9142b32ca3114ab

2 years agoagl-compositor: Add NULL check after creating surface/view 61/27061/1
AndyZhou [Wed, 22 Dec 2021 10:54:49 +0000 (18:54 +0800)]
agl-compositor: Add NULL check after creating surface/view

Add a check to verify if both the surface/view was created successfully
in function create_black_surface_view of src/shell.c file.

Bug-AGL: SPEC-4193

Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com>
Change-Id: I69c6a6023c8b7a3b6e376f3cba25020a851648ab

2 years agoagl-compositor:Add NULL check after zalloc in src directory 01/27001/6 12.91.0 marlin/12.91.0 marlin_12.91.0
AndyZhou [Wed, 22 Dec 2021 08:00:59 +0000 (16:00 +0800)]
agl-compositor:Add NULL check after zalloc in src directory

There's no NULL check in zalloc.
Add a NULL check after zalloc.
And add memory free before return error.

Bug-AGL: SPEC-4178

Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com>
Change-Id: Ic0e0e2007b2897a451507aed100ad01b65695383

2 years agoagl-compositor:Add NULL check after zalloc in screenshooter.c 00/27000/2
AndyZhou [Mon, 13 Dec 2021 03:41:25 +0000 (11:41 +0800)]
agl-compositor:Add NULL check after zalloc in screenshooter.c

There's no NULL check in zalloc.
xdg_output is alloced by zalloc.
Add a NULL check after zalloc and before use xdg_output.

Bug-AGL: SPEC-4178

Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com>
Change-Id: Idc2e3fd6be823c063a84868ba37b26ffe90db6fc

2 years agoagl-compositor: Correct several spell issues in the protocol xml files 99/26999/3
AndyZhou [Mon, 20 Dec 2021 05:32:05 +0000 (13:32 +0800)]
agl-compositor: Correct several spell issues in the protocol xml files

There are several spell issues in the protocol xml files.
Modify to correct them.

Bug-AGL: SPEC-4174

Signed-off-by: ZhouMingying <zhoumy@cn.fujitsu.com>
Change-Id: I052a1cb4b1a0054305899a1d83e4be0fd9d03c2b

2 years agoagl-compositor: Correct several spell or grammar issues in the README.md file. 33/26933/3
AndyZhou [Mon, 6 Dec 2021 09:47:55 +0000 (17:47 +0800)]
agl-compositor: Correct several spell or grammar issues in the README.md file.

There are several issues in the README.md file.
Modify to correct them.

Bug-AGL: SPEC-4154

Signed-off-by: AndyZhou <zhoumy@cn.fujitsu.com>
Change-Id: I3a26692ba5257f99038262fdd1e45d87dd84da08

2 years agolayout: Remove explicit damage call 07/27007/1
Marius Vlad [Thu, 16 Dec 2021 12:41:08 +0000 (14:41 +0200)]
layout: Remove explicit damage call

As we will be marking all the views dirty, weston_output_repaint()
should pick-up correctly any inflicted damage, and perform an
implicit redraw without the need for an explict to call to
weston_view_below_damage().

Note that we still need to schedule a repaint for that particular view.

While at it, also remove an explicit call to
weston_view_update_transform() which is going to be handled internally
as well, when rebuilding the view list by libweston.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic701daebe69613b3dcc8eef96cac05c1b803327a

2 years agolayout: Inflict damage on all subsurfaces 82/26982/6
Marius Vlad [Wed, 8 Dec 2021 11:18:55 +0000 (13:18 +0200)]
layout: Inflict damage on all subsurfaces

As it has been seen with the camera-gstreamer application, when switching
back and forth between various other application and camera-gstreamer
we'll get artefacts/black surface as a result that we're only adding
damage to the main parent surface.

Bug-AGL: SPEC-4145

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Idf49e6c9100d63f5a5c63c34bfc65e8641eba822

2 years agomeson.build: Bump compositor version 32/26932/2
Marius Vlad [Tue, 23 Nov 2021 18:50:25 +0000 (20:50 +0200)]
meson.build: Bump compositor version

This bumps the compositor version to accomodate the protocol
update well.

Bug-AGL: SPEC-4133

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iea01e3e36ef9ebf1f90e3fb07bd9637d8d060ab2

2 years agoshell: Refactor pending surfaces for existing pending ones 31/26931/2
Marius Vlad [Thu, 25 Nov 2021 22:07:09 +0000 (00:07 +0200)]
shell: Refactor pending surfaces for existing pending ones

This patch refactors a bit the way we add pending surface roles, such
that it updates to an existing surface, rather than create a new one
with the same app_id.

Bug-AGL: SPEC-4133

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ifd7477ea0f0840d6fd82bbc21216a7694d0efa8b

2 years agosrc/desktop: Add a compositor destroy listener 30/26930/3
Marius Vlad [Tue, 23 Nov 2021 18:46:37 +0000 (20:46 +0200)]
src/desktop: Add a compositor destroy listener

Tearing down the ivi compositor instance (the shell) requires listening
for such an event and handle any potential destruction of surfaces.
With it we use to destroying any pending surfaces might have been left.

Bug-AGL: SPEC-4133

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I911c590409700374007673da680b7a76f69be1b2

2 years agosrc/shell: Add set_app_property_mode request 29/26929/2
Marius Vlad [Tue, 23 Nov 2021 18:12:02 +0000 (20:12 +0200)]
src/shell: Add set_app_property_mode request

Bug-AGL: SPEC-4133

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iffc770e079788bb553077665169365dc7b2d901e

2 years agolayout: Fix-up the positions when placing the pop-up/dialog 36/26836/3
Marius Vlad [Fri, 5 Nov 2021 17:38:21 +0000 (19:38 +0200)]
layout: Fix-up the positions when placing the pop-up/dialog

Turns out we weren't accounting for the initial position (of the output)
as to derive the correct positioning of thew view/surface. This uses the
output x and y value and together with the values supplied by the user
to result in correct placement.

Bug-AGL: SPEC-4127

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I38f0bb9051d4650283cfa483936b121a6d136ca6

2 years agoshell: Fix passing maximized state from the start 31/26831/2
Marius Vlad [Thu, 4 Nov 2021 15:32:28 +0000 (17:32 +0200)]
shell: Fix passing maximized state from the start

We've added an optimization where we where sending to regular (desktop)
surfaces from the beginning the maximized state, together with the size
whenever the client signaled that it is ready to present.

That optimization failed to take into account other potential roles,
more importanly, the pop-op role which should not be getting any window
state, and implicitly shouldn't be getting any surface dimensions,
leaving it to the client to decide that. Patch checks all pending lists
to make sure we're not skipping any on purpose.

Bug-AGL: SPEC-4119

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4f8c62af545c5955e7fa41c3fd73f52d6c73b600

2 years agomeson.build: Add a waltham-transmitter pkg-config pc file 75/26675/1 12.90.1 marlin/12.90.1 marlin_12.90.1
Marius Vlad [Mon, 27 Sep 2021 16:32:30 +0000 (19:32 +0300)]
meson.build: Add a waltham-transmitter pkg-config pc file

It would be of tremendous help to know when the transmitter plugin is
really installed, to avoid assuming that the waltham library is enough.

Bug-AGL: SPEC-4087

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I8c569fae641472fe9a2454a89fcf6da4f2a33ccc

2 years agomeson.build: Conditionally build with headless support 74/26674/1
Marius Vlad [Mon, 27 Sep 2021 15:23:58 +0000 (18:23 +0300)]
meson.build: Conditionally build with headless support

This allow to build the compositor without headless support, just in
case libweston wasn't built with it.

Bug-AGL: SPEC-4087

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie848d842ace06b21371de6f70ad18600927f8044

2 years agomeson.build: Clarify out-of-tree build error 73/26673/1
Marius Vlad [Mon, 27 Sep 2021 15:07:07 +0000 (18:07 +0300)]
meson.build: Clarify out-of-tree build error

And with it remove libweston-X mentioning, as it applies to all
libweston versions.

Bug-AGL: SPEC-4087

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I47b37822204c3ce1397a6a5efc9e7ee6ce1e8e1b

2 years agoclients/screenshooter: Fix taking screenshot on multiple outputs 15/26615/1
Marius Vlad [Fri, 3 Sep 2021 11:46:53 +0000 (14:46 +0300)]
clients/screenshooter: Fix taking screenshot on multiple outputs

Turns out we were re-initializing the buffers min/max values each time
for each output, thus not computing the entire combined output. This is
a trivial fix.

Bug-AGL: SPEC-4064

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie0c7490c902273b42c81e09cd08e480f30a654c0

2 years agocompositor: Do not allow vt-switching by default 75/26575/1
Marius Vlad [Thu, 26 Aug 2021 16:12:29 +0000 (19:12 +0300)]
compositor: Do not allow vt-switching by default

Users are still able to customize that behaviour by modifying
configuration file.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id21b9cf5b486b8f124bfc128c139f8b706c16b45

2 years agocompositor: Avoid loading systemd-notify plug-in 52/26452/2
Marius Vlad [Thu, 24 Jun 2021 09:04:47 +0000 (11:04 +0200)]
compositor: Avoid loading systemd-notify plug-in

This helps being compliant with the weston ini configuration file, and
in the same time being able to load other necessary modules. Instead of
creating a separate module for loading the systemd-notify do the same
thing as xwayland and avoid any attempt of loading it if passed over the
command line, or specified in the ini file.

Bug-AGL: SPEC-4001

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I46018f2dff5599bb3acc7c7334e77437995d0588

2 years agomeson.build: Install run-time shared library to a specific path 53/26453/1
Marius Vlad [Thu, 24 Jun 2021 10:40:52 +0000 (12:40 +0200)]
meson.build: Install run-time shared library to a specific path

Use prefix_path + libdir to install the run-time shared library and
avoid pulling lib with it.

This is necessary to avoid installing under PREFIX/ and use
PREFIX/agl-compositor instead. This was unfortunately missed
when doing the split in a previous commit.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I02b2162f62cbdbf3d00f54edae52aa03c7b4b046

3 years agomain: Split of main() from wet_main() 83/26283/1 sandbox/mvlad/pre-ci 11.91.0 11.92.0 12.90.0 lamprey/11.91.0 lamprey/11.92.0 lamprey_11.91.0 lamprey_11.92.0 marlin/12.90.0 marlin_12.90.0
Marius Vlad [Tue, 20 Apr 2021 12:06:15 +0000 (15:06 +0300)]
main: Split of main() from wet_main()

This is follow-up to catch up with weston's way of loading the
compositor instance. This is necessary because the test itself is
capable of loading a specific compositor instance (and with, specific
arguments).

No functional changes whatsoever.

Bug-AGL: SPEC-3889, SPEC-3880

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iedb979156a73def4567927969ab9190c481ffbce

3 years agomain: Copy cmd line args and print them 82/26282/1
Marius Vlad [Tue, 20 Apr 2021 11:19:08 +0000 (14:19 +0300)]
main: Copy cmd line args and print them

This makes it really easy to spot on what arguments have been passed to
the compositor. When a test client will run the compositor this will be
helpful to verify that we pass the correct arguments.

Fixes a small typo along the way.

Bug-AGL: SPEC-3880

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia4198ce6bff465f479cf9a0a87c17998c5548868

3 years agomain: Teach agl-compositor to load additional modules 81/26281/1
Marius Vlad [Tue, 20 Apr 2021 10:31:18 +0000 (13:31 +0300)]
main: Teach agl-compositor to load additional modules

Passing modules arguments to the compositor instance would be useful
when using the testing framework/harness because that way the test
itself can start-up. The idea here is that we would need to load-up a
testing plug-in (either one from weston) or one written specifically for
this.

Bug-AGL: SPEC-3888

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia5e688901fe11b1ab10feb3f5e2631a0f31707be

3 years agomain: Add support for loading the headless-backend 80/26280/1
Marius Vlad [Tue, 20 Apr 2021 09:40:19 +0000 (12:40 +0300)]
main: Add support for loading the headless-backend

For making use of the testing framework/harness we should be able to
load up the headless backend. This patch adds support for loading it.

Bug-AGL: SPEC-3887

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I569ad3e562cd0a90094c6238ca02ed00e4106b10

3 years agomeson.build: Do an release update before libweston9 integration 48/26248/2
Marius Vlad [Fri, 9 Apr 2021 08:05:23 +0000 (11:05 +0300)]
meson.build: Do an release update before libweston9 integration

We haven't had an release for quite some time now so, do it now before
the libweston9 integration.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I8202f88565a94e10cc5dc60fe2ec30cc1e8ee478

3 years agolayout: Remove weston_output_damage dependecy 46/26246/4
Marius Vlad [Wed, 7 Apr 2021 15:09:06 +0000 (18:09 +0300)]
layout: Remove weston_output_damage dependecy

Doing a damage_below for the view should be sufficient to trigger a
repaint. This way we don't actually need it.

Bug-AGL: SPEC-3641

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I90f4c4c13571f441b35f933f2b93aaff7efd3481

3 years agolayout: Fix split role sending invalid dimensions 45/26245/1
Marius Vlad [Wed, 7 Apr 2021 19:16:02 +0000 (22:16 +0300)]
layout: Fix split role sending invalid dimensions

As we send from the beginning/start the size for the client, we'll be
missing a checking when using split type of surfaces, which will result
in invalid width/height passed to clients on configure events. Avoid
using it entirely and assume for split roles to use half of the output
by default.

Bug-AGL: SPEC-3881

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia9728c9401cdd1ae918229853ddf7393e14f6cb1

3 years agodesktop: Tell clients to use current geometry area from start 55/26155/1
Marius Vlad [Wed, 10 Mar 2021 22:24:04 +0000 (00:24 +0200)]
desktop: Tell clients to use current geometry area from start

After the shell UI is started we can tell clients the available geometry
area, and with it, they can avoid resizing to the surface size.

Bug-AGL: SPEC-3839

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id30617dadc665d1ca202a505d98e70eed592e856

3 years agodesktop: Send remove event only if output and app_id is set 54/26154/1
Marius Vlad [Wed, 10 Mar 2021 18:03:07 +0000 (20:03 +0200)]
desktop: Send remove event only if output and app_id is set

This will guard against clients do not have an application id, or they
weren't activated at all.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iee58c0f54efdecce82ff07e0916ebef15f7f64d8

3 years agoNotify about application destruction 54/26054/2
Walter Lozano [Wed, 17 Feb 2021 14:00:44 +0000 (11:00 -0300)]
Notify about application destruction

Currently agl-compositor notifies about application ids which can be
activated/deactivated, as well as the application state. However, when
an application is destroyed this information is not communicated to desktop
making it out of sync with the actual list of available applications.

To overcome this limitation extend the protocol and the logic to notify
about application destruction on surface remove.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: Ib766cf3f3fbd10f55b85212480dc4717ab1bec22

3 years agoAllow unregistered applications in rba 92/25992/2
Anusha Gugale [Thu, 4 Feb 2021 07:01:05 +0000 (12:31 +0530)]
Allow unregistered applications in rba

- To allow unregistered applications, set allow_unregistred_app=true
  in .ini file under core section of /etc/xdg/weston/weston.ini .

  Bug-AGL: SPEC-3738

Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com>
Change-Id: Ic56564ea97900df0091d92a2dd4ed1bc7cb0559f

3 years agoUse parameterized constructor of RBAArbitrator 36/25936/3 10.93.0 koi/10.93.0 koi_10.93.0
Anusha Gugale [Thu, 21 Jan 2021 03:38:43 +0000 (09:08 +0530)]
Use parameterized constructor of RBAArbitrator

- To hide unnecessary internal interfaces from user, reconstructed
  public files of librba. At this time, default constructor has been removed.

  Bug-AGL: SPEC-3738

Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com>
Change-Id: I957796861081c79df9018cac92bd06927952924d

3 years agodoc/arch_diagram: Update architecture diagram with a small legend 02/25902/1
Marius Vlad [Wed, 13 Jan 2021 13:20:39 +0000 (15:20 +0200)]
doc/arch_diagram: Update architecture diagram with a small legend

Trivial change to display which are API calls, which are Wayland ones.

Bug-AGL: SPEC-3386

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I265e19baaa7437af4221a71378706661395b4445

3 years agoAdded rba policy implementation 23/25823/8 10.92.0 koi/10.92.0 koi_10.92.0
Anusha Gugale [Thu, 17 Dec 2020 09:38:36 +0000 (15:08 +0530)]
Added rba policy implementation

- Added rba-policy option in meson file
- Created new rba adapter file to call rba interfaces from librba
- All the application from Homescreen will be allowed to
  display through rba policy as its added in RBAModel.json

  Bug-AGL: SPEC-3738

Signed-off-by: Anusha Gugale <external.agogale@jp.adit-jv.com>
Change-Id: Iffd4ac16d9abe768476d025556cbe98a31553288

3 years agomeson.build: Fix building with cross SDK 68/25868/1
Marius Vlad [Wed, 6 Jan 2021 17:14:12 +0000 (19:14 +0200)]
meson.build: Fix building with cross SDK

For some time now, yocto/OE no longer builds all weston back-ends, which
means the X11 is no longer supported on AGL platform.

The agl-compositor can be built, assuming all dependencies have been
satisfied, without the need of having an AGL or yocto/OE environment,
but so far, I've never tried using SDK directly.

This patch should allow building the compositor, by only using the AGL
SDK, and instead of using the local pkg-config, only use what is
available in the SDK sysroot. This takes care of assuming that X11
back-end is available, when in reality, in the AGL SDK platform that is
not the case.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia2a182b9c3015f14f82043a04e83e917cd99bf6f

3 years agomain: Add activate_by_default ini option 67/25867/1
Marius Vlad [Wed, 6 Jan 2021 16:24:01 +0000 (18:24 +0200)]
main: Add activate_by_default ini option

Displaying the application surface as soon as started required
activating the surface by default. With this patch, we give the
possibility to do it conditionally, as it helps CI with cases where we
don't really want other applications change the active surface.

With applications that start by default, this interferes with the
ability to take a screenshot with just the background.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I6e826a6715b9a348181df80ed53ffaa6b65b7d2b

3 years agolayout: Do not attempt to activate surfaces that doesn't have a valid app_id 85/25585/3 10.91.0 koi/10.91.0 koi_10.91.0
Marius Vlad [Wed, 18 Nov 2020 13:54:39 +0000 (15:54 +0200)]
layout: Do not attempt to activate surfaces that doesn't have a valid app_id

Observed when trying to activate (a previous one, as a result
of deactivation) a surface that didn't had an application id set.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I3c39ae7dfb237e53f4b2bad64e7bc5ef91a76f0c

3 years agoshell: Throttle the log message 84/25584/2
Marius Vlad [Wed, 18 Nov 2020 13:06:29 +0000 (15:06 +0200)]
shell: Throttle the log message

As libweston doesn't currently have a rate limiting the log message
function, use a static variable to limit the amount of log message we
might be seeing if application do not set-up an app_id.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4fb3a5b7421a154d8da483b2ac577df7a60e09cc

3 years agobuild/: Allow to build the compositor w/o waltham 83/25583/2
Marius Vlad [Wed, 18 Nov 2020 12:36:23 +0000 (14:36 +0200)]
build/: Allow to build the compositor w/o waltham

Provides empty implementations to avoid sprinking ifdefs everywhere. The
transmitter plug-in does not expose a pkgconfig file we instead resort
to test again waltham protocol (which is used by the transmitter) and
the the remoting plug-in.

Fixes a minor deps check in the meson file.

Bug-AGL: SPEC-3691

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id25d21d2ef0c6e55575c2e7685cda73e401db015

3 years agoshell: Perform wl_list_init() after wl_list_remove() 76/25576/2
Walter Lozano [Sun, 15 Nov 2020 19:52:12 +0000 (19:52 +0000)]
shell: Perform wl_list_init() after wl_list_remove()

In order to follow the best practices perform wl_list_init() after
wl_list_remove() on shell_ready.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: Ia5ea915a5ad55e8251e3bc86c87ddfc140bbe592

3 years agodesktop: Allow to remove surface from pending list 57/25557/4
Walter Lozano [Fri, 13 Nov 2020 14:46:08 +0000 (14:46 +0000)]
desktop: Allow to remove surface from pending list

In some special corner cases a surface can be removed while it is
still in the pending list. An example of this case is when a surface
is added and removed before the system is ready. Under this circumstances
the surface still has role == ROLE_NONE and is in the pending list.

The fact of not removing the surface from the pending_list ends in a
segfault when the system is ready.

In order to fix the issue, remove the restriction to only remove surfaces
with role != ROLE_NONE.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: Ia71b6c3ca214849448c935cc09039581d0e209a8

3 years agodesktop: Do not attempt to advertise the clients if there are none 56/25556/2
Marius Vlad [Thu, 12 Nov 2020 21:31:24 +0000 (23:31 +0200)]
desktop: Do not attempt to advertise the clients if there are none

Clients not binding to agl_shell_desktop will cause spurious signal
emits when they commit the changes. Make sure we only attempt to
advertise if the are clients.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5c790b105b7c7f7d759e8a8fc2c64713df22d561

3 years agodesktop: Delay surface creation until committed 86/25486/3
Walter Lozano [Mon, 26 Oct 2020 18:08:09 +0000 (18:08 +0000)]
desktop: Delay surface creation until committed

Some frameworks like GTK-3 delay the set_app_id until title and
parent are set, which makes ivi_check_pending_desktop_surface
unable to set the proper role on surface_added. A consequence
of this behaviour is that is not possible to use set_app_property
to configure an application as popup.

Instead, delay the creation of the surface until committed to give
the chance to have a valid app_id configured.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: I3f672fb365f48659711c866c45a21df6058a5a02

3 years agoshell: Destroy weston_transmitter_surface as well 80/25480/3
Marius Vlad [Wed, 21 Oct 2020 21:07:53 +0000 (00:07 +0300)]
shell: Destroy weston_transmitter_surface as well

Instruct waltham-transmitter-plugin that it can destroy its own
surface representation when the weston_surface is also destroyed.

Bug-AGL: SPEC-3601, SPEC-3611

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie0e5409b21c043b8c98bebb4d77808227ee38aca

3 years agoshell: Keep a reference to weston_transmitter_surface 79/25479/2
Marius Vlad [Wed, 21 Oct 2020 20:31:16 +0000 (23:31 +0300)]
shell: Keep a reference to weston_transmitter_surface

When 'pushing' the surface store a reference of the
weston_transmitter_surface so we can later inform the plug-in when the
weston_surface is destroyed, so that it can also destroy the
transmittter_surface from its side.

Bug-AGL: SPEC-3601, SPEC-3611

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7fd1df2130e53e8c226c7a751c598765608ae6b3

3 years agodesktop: Insert a black surface only when the output is a remote type 78/25478/2
Marius Vlad [Wed, 21 Oct 2020 18:51:09 +0000 (21:51 +0300)]
desktop: Insert a black surface only when the output is a remote type

And the output is not a waltham version.

Bug-AGL: SPEC-3601, SPEC-3611

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I9ce3354fe59ad5f4de691823627e3603fc4cb226

3 years agodesktop: Group tests for checking against last remote surface 77/25477/2
Marius Vlad [Wed, 21 Oct 2020 17:06:49 +0000 (20:06 +0300)]
desktop: Group tests for checking against last remote surface

Synthetic change, to group them together. Makes reading the code a bit
more clearer.

Bug-AGL: SPEC-3601

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id1f5ad9a408591a010678a53eff0f3cad2d269d9

3 years agoshell: Push the surface to the remote side 38/25438/3
Marius Vlad [Wed, 14 Oct 2020 12:18:08 +0000 (15:18 +0300)]
shell: Push the surface to the remote side

The receiver expects that the sender/transmitter will inform it when it
can create a surface and it can start the gstreamer pipeline.

The transmitter plug-in exposes a way to call that using 'push_surface'
callback. So, whenever we detect that the remote surface is to be
assigned to a waltham-type of output, we would need to call into this
'push_surface' callback. This acts as notification mechanism for the
remote side.

Bug-AGL: 3611

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia5db0d8f2356708eaee3fbaabed2b3ba3ac97eb6

3 years agomain: Create a remoting output if the waltham plug-in has been loaded 37/25437/3
Marius Vlad [Wed, 14 Oct 2020 10:58:57 +0000 (13:58 +0300)]
main: Create a remoting output if the waltham plug-in has been loaded

The waltham-transmitter will no longer create an output on its own so
we'll re-use the remoting plug-in for streaming out the buffers to the
remoting side.

Bug-AGL: 3601

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I6f85c3dfc54e81e8fa05f518b77fae24334fafc1

3 years agoivi-compositor: Add the ability to distinguish between different 36/25436/3
Marius Vlad [Wed, 14 Oct 2020 10:21:16 +0000 (13:21 +0300)]
ivi-compositor: Add the ability to distinguish between different
types of remoting outputs

This is required to further differentiate between remoting outputs as for
waltham we would need to use the transmitter_api to forward a surface
to the remoting output.

Bug-AGL: 3611

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7c59fd448226afab0492fe674e8770d3b9a995aa

3 years agomain: Add support loading waltham transmitter plug-in 35/25435/3
Marius Vlad [Fri, 2 Oct 2020 18:28:51 +0000 (21:28 +0300)]
main: Add support loading waltham transmitter plug-in

This is the same as the remoting plug-in, given that we'll be using the
remoting plug-in to create the remoting output.

The difference would be that instead of the 'remoting-output' section
we'll use 'transmitter-output', with all other section specific being
the same. For instance, using agl-shell-app-id we can instruct the
application to be assigned to that 'transmitter-output'.

Bug-AGL: SPEC-3611

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic16b6b9672802f4f83be121385c0798b9dbe08e9

3 years agolayout: Check app_id for remote type of surfaces 34/25434/3
Marius Vlad [Tue, 6 Oct 2020 06:54:45 +0000 (09:54 +0300)]
layout: Check app_id for remote type of surfaces

We don't have any checks against for not having an app_id being set.

Bug-AGL: SPEC-3601

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iff7f633bced60b1177f53246880952a06cb716f0

3 years agoshell: Avoid creating and inserting black surface 33/25433/3
Marius Vlad [Tue, 6 Oct 2020 06:51:42 +0000 (09:51 +0300)]
shell: Avoid creating and inserting black surface

Creating and inserting the black surface will require to have an
valid weston output. That might not be always the case so guard
against no output being set.

Bug-AGL: SPEC-3601

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If7034bf0259fee164ba0f4b6a6ac3ef7d6bf30d6

3 years agomain: Use the output handler to destroy to black view 91/25491/1
Marius Vlad [Thu, 29 Oct 2020 20:59:02 +0000 (22:59 +0200)]
main: Use the output handler to destroy to black view

Use the specific output destroyer handler, instead of destroying it in
the handler itself. This way we can still clean-up and avoid any leaks,
and still not trip ourselves causing a use-after-free, when the output
is destroyed by libweston.

Bug-AGL: SPEC-3630, SPEC-3672

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: I11916245b85d2541286ee438284601b466dc20c2

3 years agoshell: Advertise app when app_id is available 08/25408/3
Walter Lozano [Wed, 23 Sep 2020 13:31:23 +0000 (13:31 +0000)]
shell: Advertise app when app_id is available

When using GTK-3 to create apps, the framework issues set_parent_id
which forces a surface to be added even before the app_id is set.
This causes the compositor to fail to advertise the app.

This patch tries to overcome this issue by checking on surface commit
if the surface was previously advertised, and do it if it was not.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: I4e5fec82c1008c30d8ae7d213d85a82e39c404c3

3 years agoshell: Avoid advertising applications without app_id set 56/25356/3
Walter Lozano [Thu, 8 Oct 2020 17:07:55 +0000 (14:07 -0300)]
shell: Avoid advertising applications without app_id set

When using GTK-3 to create apps, the framework issues set_parent_id
which forces a surface to be added even before the app_id is set.
This causes the compositor to try to advertise an invalid app_id.

This patch avoids advertising an app which has no app_id set.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: Iadcea106e6464b41171a2aa92aa0eed3a8e2ff2d

3 years agomain: Create black surface after listening socket 04/25404/2
Walter Lozano [Thu, 8 Oct 2020 02:19:45 +0000 (02:19 +0000)]
main: Create black surface after listening socket

If agl-compositor is started without XDG_RUNTIME_DIR defined, an error
arises and the system tries to exit cleanly. However, in this process a
segfault is produced and the terminal is left misconfigured.

The cause of this segfault is related to the destruction of the black
surface, which is not handled properly in this corner case.

In order to avoid this issue and as an initial fix, create the surface
after the listening socket, which causes that the check for the var
XDG_RUNTIME_DIR to be done before the surface creation.

Bug-AGL: SPEC-3623

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Change-Id: I04760828f9ce5b5a6d4a31aeccdefe779a1c15a3

3 years agomain: Use a configuration option for hidding out the cursor 04/25304/3
Marius Vlad [Fri, 18 Sep 2020 19:21:16 +0000 (22:21 +0300)]
main: Use a configuration option for hidding out the cursor

Bug-AGL: SPEC-3580

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I3504fc2c6dda3c10a67a23e68126201acd4ba455

3 years agomain: Enable screenshoter interface when debug option is passed 03/25303/3
Marius Vlad [Fri, 18 Sep 2020 17:38:07 +0000 (20:38 +0300)]
main: Enable screenshoter interface when debug option is passed

Bug-AGL: SPEC-3580

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I9adf8c707991301f5cf214b492ce3c6ee45997e2

3 years agoinput: Add basic seat handling 02/25302/3
Marius Vlad [Wed, 16 Sep 2020 21:24:31 +0000 (00:24 +0300)]
input: Add basic seat handling

This allows for basic input handling, to better customize how we handle
out seat capabilities to the client. One useful outcome of this is the
fact that we re-advertise to the client that in some situations there
might not be a pointer available. That should let the client know as to
avoid creating a pointer surface.

Bug-AGL: SPEC-3591

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4624a956264e9fa12a86da005944e9b426dde10a