Marius Vlad [Wed, 3 Jun 2020 14:52:07 +0000 (17:52 +0300)]
main, layout: Minor clean-ups and added some further logging
Identifies the output being used, and removes the need to have the macro
set. At the moment purely informative, but might be needed in case of
debugging.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7bdb49e7f97ce49afb035ee7b089094fc4aad3a2
Marius Vlad [Tue, 2 Jun 2020 15:17:30 +0000 (18:17 +0300)]
main: Retrieve the agl-shell-app-id from the config file
Just like local outputs, use the agl-shell-app-id specified in the
'remote-output' section to assign that output to the specific
application id.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I43ba74889b8ea529ab9ec0ebdf8a8dd56762cc40
Marius Vlad [Tue, 2 Jun 2020 15:12:39 +0000 (18:12 +0300)]
main: Retrieve the transform and scale from config file
We were missing retrieving the scale and transform for the
remote-output.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I0842f62487a665d02e0cf9c005755a6260fad180
Marius Vlad [Tue, 2 Jun 2020 14:33:39 +0000 (17:33 +0300)]
src: Create an ivi_output for the remote output
Ensures that we can retrieve the ivi_output from a weston_output using
its destroy listener. Necessary for setting and retrieving the wl_output
when activating/moving surfaces to that 'remote' output.
Bug-AGl: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I1457c27c90826f4c71e64820c3d359566445eb5e
Marius Vlad [Tue, 2 Jun 2020 13:37:25 +0000 (16:37 +0300)]
src: Hold a reference for remoting_api in the ivi_compositor
This will be necesary a bit in the future, to ensure that we can't
later on enable the remote output so we need access to the api.
Bug-AGl: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ica13548c852efb7ae4cabade634a6629ed6fe215
Marius Vlad [Tue, 2 Jun 2020 09:47:13 +0000 (12:47 +0300)]
main: Add the ability to load the remote plugin
Streaming to 'remote' outputs needs the remote-plugin library.
We build it automatically if we determine that the gst dependencies are
satisfied, otherwise we're using a stub version for it.
Unfortunatelly, upstream doesn't provide necessary header for the
remoting.h so we copy-paste directly. Will follow up with upstream
to provide headers for the plugins.
Bug-AGl: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ide277b402c511ed075fa1c5aaaf7770b50359c35
Marius Vlad [Mon, 1 Jun 2020 17:17:23 +0000 (20:17 +0300)]
desktop: Remove commiting code for the panel
We no longer use older qtwayland version so there's no need to
keep in place anymore.
Bug-AGl: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Icad3d208ea96739b780dfef5911e855a7a39af6a
Marius Vlad [Mon, 1 Jun 2020 17:12:07 +0000 (20:12 +0300)]
shell: Do not remove the black surface if we don't have a background
set for that output
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I07ca7108e37dcdb992de0e2223bde3f9fa200863
Marius Vlad [Mon, 1 Jun 2020 18:46:32 +0000 (21:46 +0300)]
desktop: Display a black surface for apps being moved using config file
Just like the 'remote' surface roles, put back a black surface if
there's no background set and if it is the last surface on that output.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7bd7ae55fc668753223a23462b697071faa16525
Marius Vlad [Mon, 1 Jun 2020 18:04:18 +0000 (21:04 +0300)]
layout: Remove black surface when trying to use migrate views to other
outputs
We install a black surface in the fullscreen layer for each output, and
we need to remove it before adding the new surfaces/views. We did that
aleady for 'remote' type of surfaces when categorizing the type, but
here we use the configuration file to determine the output, but we were
missing the black surface for that output. This verifies that the black
surface for that output is in use, and removes the black surface if so.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I3c4ae90ee0983bc424c932715d9a1ff082117bef
Marius Vlad [Mon, 1 Jun 2020 15:31:22 +0000 (18:31 +0300)]
src/: Use agl-shell-app-id to set-up views on a different output
This makes it easier to specify the application directly in the
configuration file, without the ned to modify the application code.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic38ca0aaf05ce8f1c4993341c9d767acfd25eb43
Marius Vlad [Fri, 29 May 2020 21:14:24 +0000 (00:14 +0300)]
layout: Add a wrapper to print out the surface role
With this we add a few more debug statements to the log file.
Nothing too spurious but helps debugging more quickly if needed.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If345903428cbb9c895e22980fdf64aec3c03d3b7
Marius Vlad [Fri, 29 May 2020 18:46:53 +0000 (21:46 +0300)]
src: Insert a black surface/remove it when the last remote
surface role is present
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia47c0539ff26d1378bb9ac75e19592d7b8b2b3bf
Marius Vlad [Fri, 29 May 2020 18:29:41 +0000 (21:29 +0300)]
layout, desktop: Treat the remote surface role like the desktop one
Necessary changes so that we can handle the remote surface just like the
regular desktop one. We use the same code when committing the surface
but modify the completion part to only modify the pending output as to
avoid remote surfaces interfering with the enum representing each
surface type.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ied770c8fd8cd7021a7efb5cf07bc44ab2cf93cce
Marius Vlad [Fri, 29 May 2020 18:12:24 +0000 (21:12 +0300)]
layout: Remove the quirks as now we have the policy hooks in place
to handle that
With the policy hooks in place we no longer need this quirk to activate
surfaces by default when starting up, and was potentially seen as hole
to bypass the policy hooks. Remove it and just allow the policy hook to
control how that happens.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4c28648f0805e5c593c082c644d2e126b1d9df6b
Marius Vlad [Fri, 29 May 2020 17:41:58 +0000 (20:41 +0300)]
src/: Add the remote surface role
This patch adds the 'remote' surface role, which clients can make use of
to hint the compositor that it should place the surface on other
output.
While both private extension protocols (agl-shell and agl-shell-desktop)
explicitly require a wl_output when activating or when setting surface
roles, we still need the inform the compositor that the surface should be
placed on another output.
This is due to the activate_by_default functionality that requires
having an output being present, with the default regular XDG desktop
role deriving its output by using the output of the backgound surface
(which is being normally set by the client shell).
Just like pop-up dialog role and split surface role this patch adds
another temporary hold up place before the surface is actually created.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic67246ecc183826ae59b2c99a671885d61040249
Marius Vlad [Fri, 29 May 2020 17:16:08 +0000 (20:16 +0300)]
src/: Add all surface roles to a wrapper for retrieving the output
Adds the other surface roles to the it.
Bug-AGL: SPEC-3280
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia0c659bfd0dbf96d53ee6f24d3c4296b3ffdad2d
Marius Vlad [Sat, 2 May 2020 15:20:20 +0000 (18:20 +0300)]
layout: Do not attempt to activate a split or a fs surface
As long as there is (an already created) surface in a split/fs type of role
there's no point in trying to activate it. Users can mistakenly try to
do that so have some logic in place to avoid it.
Bug-AGL: SPEC-3334
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id9b8e039b6d53fbfb4e310166a91c2cb6a45cb4e
Marius Vlad [Fri, 1 May 2020 11:31:07 +0000 (14:31 +0300)]
layout: Resize the active surface when doing the split
This adds an intermediate geometry variable which is used to save and
restore to the original available geometry when destroying the split
surface. This takes care to inform the client that a new resize is
needed when the split surface is destroyed or when the split surface
is committed.
The width and height of the split surface is derived from the available
geometry area size (the available size of the background surface) but
this can further adapted to be based on the split window size (that is,
it could be specified by the client). This assumption is there to
simplify the implementation.
Bug-AGL: SPEC-3334
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia484a922a7cbd314db2c878f81cb548458d1c1cd
Marius Vlad [Wed, 29 Apr 2020 14:41:58 +0000 (17:41 +0300)]
layout: Allow to commit the fullscreen and split surface roles
Now that we have the ability to discern between fullscreend and
split roles, use specific functions when doing the commit to further
customize them.
Bug-AGL: SPEC-3334
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Idf4ed55533c46925638a466e9713465d710b6845
Marius Vlad [Tue, 12 May 2020 21:44:19 +0000 (00:44 +0300)]
layout: Remove unused ivi_compositor reference
Removes a unused warning about ivi_compositor.
Bug-AGL: SPEC-3334
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I40dbbdfe6036f7aa7d9c38638c1fc79e13681765
Marius Vlad [Sat, 16 May 2020 13:18:50 +0000 (16:18 +0300)]
shell: Determine the role type
Now that we have the ability to determine the role type between
pop-up diaglos, full-screen, or split ones use the wrappers installed
previously to make use of them.
Keep the same functionality by activating the desktop surface if we
determine we have one.
Bug-AGL: SPEC-3334
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ibce3bc040ce3683ab41709d68d5fbf90d90ea539
Marius Vlad [Wed, 29 Apr 2020 14:14:58 +0000 (17:14 +0300)]
shell: Introduce fullscreen and split role type of a surface
With it, this also adds two pending lists, for each role type and
aggregates the checks used to compare against the roles type when the
surface is being created. There's no functional at this stage.
Bug-AGL: SPEC-3334
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I1900399fe35d9dbc26a93c374ac2f86efa860ba6
Marius Vlad [Mon, 8 Jun 2020 14:11:52 +0000 (17:11 +0300)]
desktop: Missing assert include
Commit
a2f9566bdbfcb8ee added an assert but failed to include the proper
header causing an warning and a failure when building locally.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5bd0754f0a8dee74e9d5b09d34d80633cb96e666
Marius Vlad [Sat, 30 May 2020 19:12:13 +0000 (22:12 +0300)]
desktop: Handle correctly panel and bg removal of agl-shell unbind
We don't need to free the ivi_surface when un-binding the agl-shell, as
that should happen when `desktop_surface_removed()` is called.
We'll just invalidate them depending on the role so that next time we're
going to able to bind again.
Bug-AGL: SPEC-3404
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I6e06b6a1029989bf3e09156b602b6eab6addc5da
Marius Vlad [Mon, 18 May 2020 20:30:07 +0000 (23:30 +0300)]
README.md: Add documentation details about agl-shell and agl-shell-desktop
This adds a few words about:
- overall architecture and design
- protocol extension, agl-shell and agl-shell-desktop
- add inline code backticks for missing function names in policy API
Bug-AGL: SPEC-3386
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I96f2b08d80ec10dda4e080a772bd2f2456535631
Marius Vlad [Fri, 8 May 2020 20:12:06 +0000 (23:12 +0300)]
main: Convert to using the logging/debuggging fraemwork
With this in place we're now using the new logging framework.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5782b9a9fa825351c630af39bf7542d4bfa14efa
Marius Vlad [Fri, 8 May 2020 20:05:45 +0000 (23:05 +0300)]
main: Add a (valid) return code when exiting
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id466a9d5bc253e5c65f7f2db328b6ea794457726
Marius Vlad [Fri, 8 May 2020 19:57:54 +0000 (22:57 +0300)]
main: We don't have weston-debug extension available
Copy-pasta mistake, as we don't really have the weston-debug extension
added.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I56c36f4d5af830ba5a869a80f73f7f9df3d2e106
Marius Vlad [Fri, 8 May 2020 17:24:07 +0000 (20:24 +0300)]
meson.build: Add a meson variable to track libweston version
Avoids the need to modify, and potentially to forget (like I did), to
modify multiple places when moving/migrating to newer libweston version.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ibab581f3e5a6b8253fad0a53dfd870cd4143b797
Marius Vlad [Fri, 8 May 2020 17:20:48 +0000 (20:20 +0300)]
main: Subscribe to the logger scope
This is a no-op as the compositor isn't yet using the logging framework,
but will be added in subsequent patches.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ieda47de45de621b095163d0e682e665c36484175
Marius Vlad [Tue, 21 Apr 2020 10:45:40 +0000 (13:45 +0300)]
meson.build: Update build version
There have been suficient changes like the recent changes in the
agl-shell-desktop to require another version update.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ibead5b3e8d474f5608785680528fb92a481380ed
Marius Vlad [Tue, 21 Apr 2020 10:39:03 +0000 (13:39 +0300)]
policy-default: Install default for the state event notify
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id5840ecd1384f15c67a5dd6070f4d02c0e6df690
Marius Vlad [Tue, 21 Apr 2020 09:41:31 +0000 (12:41 +0300)]
policy: Add another hook for controlling the application state change
event
With the introduction of the events that notify regular applications
of others' application state we require some way of controlling that.
This patch adds another hook for controlling just that.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I2ade01eb5dfa454e360edd2e3943df91975da88f
Marius Vlad [Tue, 14 Apr 2020 19:00:20 +0000 (22:00 +0300)]
protocol: agl-shell-desktop: Send notification for application state change
The events are sent straight after the activation took place. The state
changes are the surface role (for instance, pop-up) and the
activate/de-activate type of event. With that information there's also a
string type of data which can be used as easy way to forward data.
Note that this isn't the proper way for applications to
communicate with each other, but merely as a convenient way to pass data
from one application to another. In order to hang-off the data, the
'activate_app' request also got an additional argument which is relayed
back with the event.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I0c9be86f6ff227b59271cac1c060563b5aac9b6c
Marius Vlad [Mon, 20 Apr 2020 16:37:53 +0000 (19:37 +0300)]
policy-default: Install default policy for deactivate request
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I9ea70e6f49eda0a475a185fc037cb2c86b2b2890
Marius Vlad [Mon, 20 Apr 2020 16:37:00 +0000 (19:37 +0300)]
policy: Add a new policy hook for deactivating apps
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7260626819b78ff7e2a245dc0a5ef566919220f7
Marius Vlad [Sun, 19 Apr 2020 17:18:14 +0000 (20:18 +0300)]
policy-default: Add the de-activate request to the default policy
We didn't have a valid de-activate for it, but with the 'deactivate_app'
that is no longer true to make use of it.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ife520e61360744231a13968f15bc0941ca163966
Marius Vlad [Mon, 6 Apr 2020 19:30:55 +0000 (22:30 +0300)]
agl-shell-desktop: Add the ability to hide client windows
This would be particularly useful to pop-up kind of window(s).
It implements the 'deactivate_app' request. For the pop-up role we
just remove the view from the layer while for the desktop we store
the previous surface and re-use it if that's set. Otherwise we just
display the background surface.
As we now allow to hide client windows, we need to able to activate/show
them back so this also adds a slight modification to take care to handle
the pop-up role separately when calling the 'activate_app' request.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iec5ccbe2815f4b0e32086fd49856f5f338147f79
Marius Vlad [Tue, 7 Apr 2020 18:43:31 +0000 (21:43 +0300)]
layout: Save the pending output
As de-activing apps make use of last_pending to retrieve the output, it
is vital to keep pending output as well, as we ultimately depend on it.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I62854c3c886a142c35287d5ef1cf492a1a81ac99
Marius Vlad [Mon, 6 Apr 2020 19:42:51 +0000 (22:42 +0300)]
shell: Store the ivi compositor in the desktop_client
Allows to retrieve the ivi compositor without passing addtional resource
in the request.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I515e8133a8bdc6400932d3c08a112982546c3ff9
Marius Vlad [Fri, 3 Apr 2020 12:20:00 +0000 (15:20 +0300)]
layout, desktop: Implement the pop-up role
Temporally store the application details in a list of pending
applications as to be used when creating the desktop surface. Store the
output alongside the x and y values, useful in setting up the initial
positional values of the window.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Icae57378ff405a8770c074a3e2fe1e04535302ef
Marius Vlad [Mon, 6 Apr 2020 11:19:31 +0000 (14:19 +0300)]
agl-shell-desktop: Allow to set role properties for the application
This extends the agl-shell-desktop protocol with a new request that
allows to set further properties on the window/client.
Bug-AGL: SPEC-3269
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia88e23c8c1cbc55c5423de480bba7f86c79897d0
Marius Vlad [Thu, 23 Apr 2020 12:55:34 +0000 (15:55 +0300)]
shell: Display previously pending surface once the ready request was received
Surfaces are being added to linked list of pending surfaces as long as
the 'ready' request wasn't received, and are being categorized as regular
apps once the 'ready' request is handled. But, in order to display it,
the surface has to be activated. With this patch we force to
display/show the last pending surface that was added before issueing
a 'ready' request.
Obviously, multiple surfaces of this kind will be displayed, but only
the last one will remain displayed on the output, hence the refernce of
just the last pending surface. A particular use-case that will benifit
from this is when for instance the launcher application is started
before homescreen. When homescreen starts it will also activate/display
the launcher surface.
Bug-AGL: SPEC-3341
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iace641c3b65d0c5500fe336e592d2e8ada57d7e9
Marius Vlad [Mon, 4 May 2020 18:37:25 +0000 (21:37 +0300)]
meson.build: Increase agl-compositor version for libweston8 upgrade
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I03f38948de5676d1c73325045fa1badee01765e2
Marius Vlad [Mon, 4 May 2020 18:35:46 +0000 (21:35 +0300)]
main: Update weston_compositor_add_log_scope to libweston8
weston_compositor_add_log_scope() got an additional argument from
libweston8.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I359fce11ba3e73ca54a2df99caee6d7333fd78f4
Marius Vlad [Mon, 4 May 2020 18:34:30 +0000 (21:34 +0300)]
meson.build: Increase to libweston8 dependency
Trivial increase dependency.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If78393eb961eb4f5ac8d605903b8adb354463f05
Marius Vlad [Mon, 4 May 2020 18:33:45 +0000 (21:33 +0300)]
main: Use bool for weston_config_section_get_bool()
weston_config_section_get_bool() uses bool instead of integer from
libweston8.
Bug-AGL: SPEC-3352
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5a3f661824f494f0ba4a02eca5a41b25a460214e
Marius Vlad [Thu, 26 Mar 2020 21:24:48 +0000 (23:24 +0200)]
layout: Mark activated surface by default
Necessary to avoid client surfaces that continuously update their
contents (i.e., a video) to effectively nullify a valid activate_app
request, causing a short flip for the new client surfaces, but resume
back once the first surface updated its contents.
Bug-AGL: SPEC-3297
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I450dc58d2fa0202f42b7ab58216db98a1bbbf178
Marius Vlad [Sat, 4 Apr 2020 15:25:09 +0000 (18:25 +0300)]
desktop: Remove the active surface only if matches the one being displayed
We incorrectly removed the active surface being displayed even if it
wasn't the one currently displayed, so this patch only removes the
active surface if the surface being removed is the same as the one being
displayed.
Bug-AGL: SPEC-3318
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I78c19692d59c3e355b2d140b75d8aadc9d8f2009
Marius Vlad [Mon, 2 Mar 2020 19:03:09 +0000 (21:03 +0200)]
meson.build: Increase the build version of agl-compositor
Increase the version for when policy part was added. Makes tracking of
issues much easier in the future.
Bug-AGL: SPEC-3217
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I77cf5e5d44b0621745f2c3dd113ab46938fd0c1d
Marius Vlad [Tue, 3 Mar 2020 18:24:19 +0000 (20:24 +0200)]
README.md: Start adding some light documentation on the policy part
Bug-AGL: SPEC-3217
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ifdd6dda9dbe91e2783c4d3546e542aa2320d3707
Marius Vlad [Fri, 6 Mar 2020 20:51:10 +0000 (22:51 +0200)]
layout: Allow by default to activate the application
Installs, for the default policy, a callback that allows it.
Bug-AGL: SPEC-3217
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic0f1a7db93df480d263db8240592f65a8864ccd6
Marius Vlad [Tue, 3 Mar 2020 12:49:35 +0000 (14:49 +0200)]
policy-default: Install a default policy engine
This is just an example on how to use the policy framework API and
allows all actions to performed by default.
Bug-AGL: SPEC-3217
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I83c9e61a2f2a89c373352232009cea4c6f6a3ad6
Marius Vlad [Tue, 3 Mar 2020 12:25:25 +0000 (14:25 +0200)]
policy: Init policy framework API
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/desining a policy engine.
Further more, it adds the posibility to further customize the policy
engine by adding new states, events and policy rules.
By default, the policy API is aware of known states like 'start' or
'stop', but also 'show' and 'hide' as events.
A policy rule would allow to define the setup in which an event can happen
based on the state of the rule compared to that of the system, 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 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, EVENT_SHOW, timeout, main_output)
Then, when a 'STATE_START' state is propagated to the compositor the
policy API will trigger a state change signal which in turn wil arm an
timer to execute the event handler after a timeout 'timeout'.
Bug-AGL: SPEC-3217
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie03c5f9b1ddb964949e4f9797cbbe2dd2b32a6b6
Marius Vlad [Fri, 28 Feb 2020 19:56:18 +0000 (21:56 +0200)]
ivi-compositor: Use the helpers for array length
Bug-AGL: SPEC-3217
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I11f5b2a761062aeb5b8c146c2b3617362a353e76
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.
Bug-AGL: SPEC-3252
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I88599fd2dc49e37349f0717baaca31a3f95cb849
Marius Vlad [Mon, 17 Feb 2020 16:04:27 +0000 (18:04 +0200)]
meson.build: Install agl-shell-desktop extension
Bug-AGL: SPEC-3252
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id7f5dedca9173ce32585fd555f1047d77508847c
Marius Vlad [Mon, 17 Feb 2020 14:48:27 +0000 (16:48 +0200)]
protocol: Advertise the applications to regular clients
The application ids will be advertised when binding the protocol
interface but also when the regular clients will create their surface.
Client are responsible for filtering their own name.
Bug-AGL: SPEC-3252
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia196e7d3b34694d7cb169228429a0e940eae8b3b
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 XDG application which want to
tell the compositor to activate another application. This mimics
the activate_app request from agl-shell, and assumes the application is
already started.
Bug-AGL: SPEC-3252
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I1f7bd1d8d2f7d8f1eedf710aef1bf1046846f9be
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
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
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
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
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>
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
Jan-Simon Moeller [Fri, 11 Oct 2019 23:13:06 +0000 (23:13 +0000)]
Initial empty repository