src/agl-compositor.git
4 years agomeson.build: Increase the build version of agl-compositor sandbox/mvlad/policy-manager-split
Marius Vlad [Mon, 2 Mar 2020 19:03:09 +0000 (21:03 +0200)]
meson.build: Increase the build version of agl-compositor

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

4 years agomeson.build: Install the agl-shell-policy XML file
Marius Vlad [Mon, 2 Mar 2020 18:58:09 +0000 (20:58 +0200)]
meson.build: Install the agl-shell-policy XML file

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

4 years agoREADME.md: Start adding some light documentation on the policy part
Marius Vlad [Tue, 3 Mar 2020 18:24:19 +0000 (20:24 +0200)]
README.md: Start adding some light documentation on the policy part

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

4 years agopolicy-default: Install the default policy
Marius Vlad [Tue, 3 Mar 2020 12:49:35 +0000 (14:49 +0200)]
policy-default: Install the default policy

This is just an example on how to use the policy frame work.

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

4 years agopolicy: Init policy framework
Marius Vlad [Tue, 3 Mar 2020 12:25:25 +0000 (14:25 +0200)]
policy: Init policy framework

This patch adds the policy framework, comprised from hooks which a
policy engine can further customize, and which are checked upon surface
creation, commit and activation. Users should create specialized
versions of these callbacks when creating a policy engine.

Further more, it adds a protocol to add states,  events and policy rules.
By default, the protocol has a few known states like 'start' or 'stop', but
also 'show' and 'hide' as events.

A policy rule allow to define the setup in which an event can happen
based on the state of the rule, the action event itself, the application and
(optional) an timeout.

The policy rules are there to specify the state, the event, and
application, but it is ultimately handled by a hook which will be called
to handle the event. The compositor will arrange to pass all that
information back to the handler, so the policy engine is in control to
check in what circumstances the policy rule can be satisfied.

These policy rules allow to handle transitional states which are common
in AGL. For instance:

If one would want to display the application 'navigation' in 3
seconds after and state has been changed to 'start', it should do
add the following rule:

('navigation', STATE_START, SHOW, 3000ms, main_output)

Then, when a 'start' state is propagated to the client shell and the
client shell will relay it back to the compositor (using  the 'apply' request),
will arm an timer to execute the event handler after a 3000ms timeout.

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

4 years agoivi-compositor: Use the helpers for array length
Marius Vlad [Fri, 28 Feb 2020 19:56:18 +0000 (21:56 +0200)]
ivi-compositor: Use the helpers for array length

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

4 years agomeson.build: Do another agl-compositor version bump 36/24036/1
Marius Vlad [Mon, 17 Feb 2020 16:07:40 +0000 (18:07 +0200)]
meson.build: Do another agl-compositor version bump

With the new agl-desktop-shell protocol created let us bump the version
once more so we know when that happened.

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

4 years agomeson.build: Install agl-shell-desktop extension 35/24035/1
Marius Vlad [Mon, 17 Feb 2020 16:04:27 +0000 (18:04 +0200)]
meson.build: Install agl-shell-desktop extension

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

4 years agoprotocol: Advertise the applications to regular clients 34/24034/1
Marius Vlad [Mon, 17 Feb 2020 14:48:27 +0000 (16:48 +0200)]
protocol: Advertise the applications to regular clients

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

4 years agoprotocol: Add agl-shell-desktop protocol 33/24033/1
Marius Vlad [Mon, 17 Feb 2020 14:42:27 +0000 (16:42 +0200)]
protocol: Add agl-shell-desktop protocol

Protocol intented for use by regular application which want to
tell the compositor to activate another application.

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

4 years agomeson.build: Bump the pc file version as well 32/24032/1
Marius Vlad [Mon, 17 Feb 2020 16:05:36 +0000 (18:05 +0200)]
meson.build: Bump the pc file version as well

With commit fd262c5563d6, "meson.build: Increase version of the compositor"
we modified only the compositor version but not the pkgconfig file which
allows to retrieve the protocol extension.

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

4 years agomeson.build: Allow to install the private extension 31/24031/1
Marius Vlad [Fri, 7 Feb 2020 12:03:18 +0000 (14:03 +0200)]
meson.build: Allow to install the private extension

This way clients can use wayland-scanner to generate their client
headers, and do not need to copy manually the extension.

Also, generate a pkgconfig file otherwise clients will have a hard time
finding the proper pkgdatadir path in order to get the agl-shell xml
file.

Bug-AGL: SPEC-3167

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

4 years agomeson.build: Increase version of the compositor 46/23946/2 next-wip
Marius Vlad [Wed, 12 Feb 2020 12:18:58 +0000 (14:18 +0200)]
meson.build: Increase version of the compositor

Bump the version of the compositor as well, as we switched to a newer
version of libweston.

Bug-AGL: SPEC-3180

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

4 years agomain: Add support for the logging context when creating the compositor 45/23945/2
Marius Vlad [Wed, 12 Feb 2020 11:08:37 +0000 (13:08 +0200)]
main: Add support for the logging context when creating the compositor
instance

The logging context was added in weston 7, but we didn't had supporting
code for it. This creates a logging context, a logging log scope, and a
logger subscriber.

Bug-AGL: SPEC-3180

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

4 years agomeson.build: Build X11 backend optionally 44/23944/2
Marius Vlad [Wed, 12 Feb 2020 11:00:36 +0000 (13:00 +0200)]
meson.build: Build X11 backend optionally

libweston6 built and installed the x11 backend unconditionally, but this
is no longer the case with newer version of weston.  Also, poky-agl
configuration specifically removes any distro features that contain x11.

Users wanting to test the compositor under a x11 backend need to
compile their own libweston version this shouldn't be a problem.

Unfortunatelly, meson does not have a easy way to determine if a header
is installed or not so after glancing over the documentation we need to
use the compilers' 'has_header' function to determine if the x11 header
was installed or not by the weston recipe.

This makes sure that if we're building out-of-tree it finds the proper
header as well.

Bug-AGL: SPEC-3180

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

4 years agomeson.build: Increase wayland-protocol version dependency 43/23943/2
Marius Vlad [Tue, 11 Feb 2020 19:32:07 +0000 (21:32 +0200)]
meson.build: Increase wayland-protocol version dependency

If we have newer wayland-protocols version make use of it.

Bug-AGL: SPEC-3180

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

4 years agomeson.build: Upgrade build and headers to libweston7 42/23942/2
Marius Vlad [Tue, 11 Feb 2020 18:48:05 +0000 (20:48 +0200)]
meson.build: Upgrade build and headers to libweston7

Bug-AGL: SPEC-3180

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

4 years agoUpdate .gitreview file 48/23848/1
Jan-Simon Möller [Tue, 11 Feb 2020 17:07:39 +0000 (18:07 +0100)]
Update .gitreview file

This updates the gitreview file in the project

.

Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Change-Id: I28a65994e848a99da005fcdffa619faa48b8cca4

4 years agomeson.build: Allow to build/install locally 30/23730/3
Marius Vlad [Fri, 31 Jan 2020 23:52:32 +0000 (01:52 +0200)]
meson.build: Allow to build/install locally

The cflags from libweston6 already have a libweston6 prefix path, which
is problematic when building locally as the compositor already uses
'libweston-6' as include directive.

This only applies to situations where libweston-6 is not installed in
system's path.

Bug-AGL: SPEC-3150

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

4 years agomeson.build: Enable Wextra and transform warning messages into errors 29/23729/2
Marius Vlad [Mon, 3 Feb 2020 16:48:36 +0000 (18:48 +0200)]
meson.build: Enable Wextra and transform warning messages into errors

Even though this is a bit too much it helps catch errors/type errors
much sooner when building with yocto, as all of debug/verbose messages
are suppressed normally.

Bug-AGL: SPEC-3150

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

4 years agomain: Avoid warning on un-initialized display 28/23728/2
Marius Vlad [Mon, 3 Feb 2020 16:48:06 +0000 (18:48 +0200)]
main: Avoid warning on un-initialized display

Bug-AGL: SPEC-3150

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

4 years agoshell: Add a black surface in the fullscreen layer 63/23763/1
Marius Vlad [Thu, 6 Feb 2020 13:25:54 +0000 (15:25 +0200)]
shell: Add a black surface in the fullscreen layer

Now that we're capable of restarting the client shell without the need
to restart the compositor, create a black surface and insert in the
fullscreen layer as to denote that the client shell is no longer
running. This black surface is removed when the 'ready' request is
received and inserted back when the client shell unbinds from the
agl-shell protocol.

Also, we were missing implementation protocol specification as the
presentation delay required a black surface being displayed instead, so
this brings the implementation closer to that of the protocol
specification.

Bug-SPEC: SPEC-3161

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

4 years agodesktop: Remove the surface in all cases 46/23746/1
Marius Vlad [Wed, 5 Feb 2020 20:00:25 +0000 (22:00 +0200)]
desktop: Remove the surface in all cases

It could happen that the surface was never switched to and maybe is not
longer available when we try to search in the surfaces list. Avoids the
case where retrieving the app_id name from a desktop surface no longer
active causes a memory violation.

Bug-AGL: SPEC-3160

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

4 years agodesktop: Reset the active surface 45/23745/1
Marius Vlad [Wed, 5 Feb 2020 19:59:01 +0000 (21:59 +0200)]
desktop: Reset the active surface

In case a previously active surface gets destroyed, we'll have a hard
time detecting if it already been active when switching to it, as it
will point a surface no longer present.

Resets the ivi active surface in case the desktop surface itself is
destroyed.

Bug-AGL: SPEC-3159

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

4 years agoshell: Allow the client shell to unbind/rebind to agl-shell interface 44/23744/1
Marius Vlad [Wed, 5 Feb 2020 16:37:05 +0000 (18:37 +0200)]
shell: Allow the client shell to unbind/rebind to agl-shell interface

Restarting the client shell requires the compositor to restart, this
removes the ivi_surfaces and from the ivi_output and normal surfaces,
pending surfaces and re-initilizes the lists for handling them.

Bug-AGL: SPEC-3158

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

4 years agolayout: Do not delay mapping of desktop surface until commit time 34/23734/2
Marius Vlad [Mon, 3 Feb 2020 19:48:39 +0000 (21:48 +0200)]
layout: Do not delay mapping of desktop surface until commit time

On some older qtwayland versions (5.11) the weston_desktop_surface
window geometry has all its members set to 0. The panel initialization
takes place with the 'ready' request and this will result in an invalid
x and y position for panels  different than the top one.

This patch alleviates that by not mapping the desktop surface in case we
determine that the desktop_surface geometry is invalid and proceed on
doing so when the surface is committed, which will allow to retrieve the
correct desktop surface and set the proper location of the panel. That
should be sufficient to display top/bottom panels until we switch a
newer qtwayland version. This keeps the panel initialization in place,
as to avoid any other changes in the future.

Bug-AGL: SPEC-3136

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

4 years agolayout: Use the background's surface ivi_output when activating apps by 07/23607/6
Marius Vlad [Wed, 15 Jan 2020 15:08:54 +0000 (17:08 +0200)]
layout: Use the background's surface ivi_output when activating apps by
default

In order to activate application by default, we need a ivi_output which
for the desktop role that's not available at that time (the activation
part actually will set-up one). Uses the bg output for this case.

This is only activated by adding 'activate-by-default' bool variable
under the '[shell]' section (in the ini configuration file).

Bug-AGL: SPEC-3118

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

4 years agoivi-compositor: Add systemd notify message 15/23615/4
Marius Vlad [Mon, 6 Jan 2020 16:22:38 +0000 (18:22 +0200)]
ivi-compositor: Add systemd notify message

Notifies systemd that agl-compositor has been started. Re-uses most of
the weston bits.

Bug-AGL: SPEC-3119

Change-Id: I1a0b41093b2ce68dd4a64475af18d27338712c3d
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
4 years agoshared: Add some regular helpers 14/23614/4
Marius Vlad [Wed, 22 Jan 2020 16:09:01 +0000 (18:09 +0200)]
shared: Add some regular helpers

Imported from weston, useful when will be adding systemd-notify, and
potentially other bits. Adds MIN/MAX/container_of.

Bug-AGL: SPEC-3119

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

4 years agolayout: Force a repaint of the entire output 05/23605/6
Marius Vlad [Mon, 6 Jan 2020 14:42:16 +0000 (16:42 +0200)]
layout: Force a repaint of the entire output

For clients which do not update their own contents, not repainting the
entire output will result in artefacts upon switching between running
applications. Forcing an entire output repaint solves it.

Bug-AGL: SPEC-3120

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

4 years agolayout: Print out when adding panels/background 04/23604/6
Marius Vlad [Thu, 26 Dec 2019 08:40:01 +0000 (10:40 +0200)]
layout: Print out when adding panels/background

Useful information but only enabled by a macro. Quickly identify
if the (client) shell has added panels/background.

Bug-AGL: SPEC-3121

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

4 years agosrc/: Add basic support for app switching 03/23303/6
Scott Anderson [Tue, 10 Dec 2019 11:48:04 +0000 (11:48 +0000)]
src/: Add basic support for app switching

- adds a new request for agl-shell, 'activate_app', which allows to
specify which application should switch to.  With it, client shell
commands which application to switch to.

- ties the layout (panel and background initizatlon) bits into its own
specific file

Bug-AGL: SPEC-3117

Change-Id: I1b3d89ff77c0e0e439666227ef3319b2107406c0
Signed-off-by: Daniel Stone <daniels@collabora.com>
4 years agoImport source, backport to libweston 6.0 42/23042/1 8.99.2 8.99.3 8.99.4 8.99.5 icefish/8.99.2 icefish/8.99.3 icefish/8.99.4 icefish/8.99.5 icefish_8.99.2 icefish_8.99.3 icefish_8.99.4 icefish_8.99.5
Daniel Stone [Mon, 25 Nov 2019 12:26:36 +0000 (12:26 +0000)]
Import source, backport to libweston 6.0

Signed-off-by: Daniel Stone <daniels@collabora.com>
Change-Id: I7705fa82dab29a27e4913cd548a2f5c3247dc5ad

4 years agoInitial empty repository
Jan-Simon Moeller [Fri, 11 Oct 2019 23:13:06 +0000 (23:13 +0000)]
Initial empty repository