summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-05-12main: Add a (valid) return code when exitingMarius Vlad1-1/+6
Bug-AGL: SPEC-3352 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id466a9d5bc253e5c65f7f2db328b6ea794457726
2020-05-12main: We don't have weston-debug extension availableMarius Vlad1-2/+0
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
2020-05-12meson.build: Add a meson variable to track libweston versionMarius Vlad1-3/+4
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
2020-05-12main: Subscribe to the logger scopeMarius Vlad1-0/+1
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
2020-05-12meson.build: Update build versionMarius Vlad0-0/+0
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
2020-05-12policy-default: Install default for the state event notifyMarius Vlad1-0/+8
Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id5840ecd1384f15c67a5dd6070f4d02c0e6df690
2020-05-12policy: Add another hook for controlling the application state changeMarius Vlad2-0/+8
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
2020-05-12protocol: agl-shell-desktop: Send notification for application state changeMarius Vlad4-4/+67
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
2020-05-12policy-default: Install default policy for deactivate requestMarius Vlad1-0/+8
Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I9ea70e6f49eda0a475a185fc037cb2c86b2b2890
2020-05-12policy: Add a new policy hook for deactivating appsMarius Vlad2-0/+7
Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7260626819b78ff7e2a245dc0a5ef566919220f7
2020-05-12policy-default: Add the de-activate request to the default policyMarius Vlad1-1/+1
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
2020-05-12agl-shell-desktop: Add the ability to hide client windowsMarius Vlad4-2/+132
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
2020-05-12layout: Save the pending outputMarius Vlad1-1/+1
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
2020-05-12shell: Store the ivi compositor in the desktop_clientMarius Vlad2-0/+4
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
2020-05-12layout, desktop: Implement the pop-up roleMarius Vlad5-4/+160
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
2020-05-12agl-shell-desktop: Allow to set role properties for the applicationMarius Vlad1-0/+21
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
2020-05-11shell: Display previously pending surface once the ready request was receivedMarius Vlad1-1/+7
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
2020-05-04meson.build: Increase agl-compositor version for libweston8 upgradeMarius Vlad1-2/+2
Bug-AGL: SPEC-3352 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I03f38948de5676d1c73325045fa1badee01765e2
2020-05-04main: Update weston_compositor_add_log_scope to libweston8Marius Vlad1-1/+1
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
2020-05-04meson.build: Increase to libweston8 dependencyMarius Vlad1-2/+2
Trivial increase dependency. Bug-AGL: SPEC-3352 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If78393eb961eb4f5ac8d605903b8adb354463f05
2020-05-04main: Use bool for weston_config_section_get_bool()Marius Vlad2-5/+5
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
2020-04-14layout: Mark activated surface by defaultMarius Vlad3-1/+10
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
2020-04-10desktop: Remove the active surface only if matches the one being displayedMarius Vlad1-1/+1
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
2020-03-11meson.build: Increase the build version of agl-compositorMarius Vlad1-2/+2
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
2020-03-11README.md: Start adding some light documentation on the policy partMarius Vlad1-0/+51
Bug-AGL: SPEC-3217 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ifdd6dda9dbe91e2783c4d3546e542aa2320d3707
2020-03-11layout: Allow by default to activate the applicationMarius Vlad2-3/+14
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
2020-03-11policy-default: Install a default policy engineMarius Vlad3-0/+111
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
2020-03-11policy: Init policy framework APIMarius Vlad6-0/+527
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
2020-03-11ivi-compositor: Use the helpers for array lengthMarius Vlad2-2/+1
Bug-AGL: SPEC-3217 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I11f5b2a761062aeb5b8c146c2b3617362a353e76
2020-03-06meson.build: Do another agl-compositor version bumpMarius Vlad1-2/+2
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
2020-03-06meson.build: Install agl-shell-desktop extensionMarius Vlad1-1/+2
Bug-AGL: SPEC-3252 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id7f5dedca9173ce32585fd555f1047d77508847c
2020-03-06protocol: Advertise the applications to regular clientsMarius Vlad2-0/+36
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
2020-03-06protocol: Add agl-shell-desktop protocolMarius Vlad5-0/+108
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
2020-03-04meson.build: Increase version of the compositorMarius Vlad1-2/+2
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
2020-03-04meson.build: Build X11 backend optionallyMarius Vlad2-1/+29
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
2020-03-04meson.build: Increase wayland-protocol version dependencyMarius Vlad1-1/+1
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
2020-03-04main: Add support for the logging context when creating the compositorMarius Vlad1-3/+25
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
2020-03-04meson.build: Upgrade build and headers to libweston7Marius Vlad8-20/+20
Bug-AGL: SPEC-3180 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ifa74b658307ee40d789f90882d210ea2d65c2898
2020-02-14meson.build: Allow to install the private extensionMarius Vlad1-0/+23
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
2020-02-11Update .gitreview fileJan-Simon Möller1-0/+5
This updates the gitreview file in the project . Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Change-Id: I28a65994e848a99da005fcdffa619faa48b8cca4
2020-02-10meson.build: Allow to build/install locallyMarius Vlad1-0/+13
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
2020-02-10meson.build: Enable Wextra and transform warning messages into errorsMarius Vlad1-0/+2
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
2020-02-10main: Avoid warning on un-initialized displayMarius Vlad1-1/+1
Bug-AGL: SPEC-3150 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Idda7b48313d05aa520a43a9af3db3a4be1710d9d
2020-02-07shell: Add a black surface in the fullscreen layerMarius Vlad3-1/+112
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
2020-02-06desktop: Remove the surface in all casesMarius Vlad1-1/+1
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
2020-02-06desktop: Reset the active surfaceMarius Vlad3-0/+13
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
2020-02-06shell: Allow the client shell to unbind/rebind to agl-shell interfaceMarius Vlad1-0/+47
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
2020-02-04layout: Do not delay mapping of desktop surface until commit timeMarius Vlad3-2/+103
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
2020-02-02layout: Use the background's surface ivi_output when activating apps byMarius Vlad3-1/+54
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
2020-01-30ivi-compositor: Add systemd notify messageMarius Vlad4-0/+219
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>