Age | Commit message (Collapse) | Author | Files | Lines |
|
Bug-AGL: SPEC-4977
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ib26d0b9f9d47e7d2e2d42b47a9702ba31d03f3b9
|
|
This bigger patch changes the way gRPC proxy client connects to the
server, more specifically how it binds to the same agl_shell interface
as the shell client.
I debated if this should be split into more pieces but I think it makes
more sense to have contained into a single patch as it doesn't make
sense to have some bits off and some bits on, as both the server and the
client side need to be changed at the same time.
This biggest change with this patch is to avoid a potential race condition
between the gRPC proxy client and the shell-client, but also to simplify
the way the gRPC client connects to the server as there aren't sufficient
guards in the server to the provent various corner cases to take place.
Rather than attempting to fix that, simplifying the entire bit and
allow only a single agl-shell client and a sigle gRPC proxy client
connected at a single time and remove any other potential clients
trying to connect at all, later on.
Context and usage:
Both the gRPC proxy and shell-client bind to the same agl_shell
interface, meaning that both use the shell-client (homescreen,
flutter-ics-homescreen, flutter-auto, wam) and the gRPC proxy can
issue agl_shell requests, with some minor differences --
setting background and panels which do not make sense for
gRPC proxy client.
The compositor can signal back to clients when a bind was OK or
not with the bound_ok/bound_fail event. Previously to
adding the bound_ok/bound_fail events, any other client trying to use
agl_shell interface, more than once, would get a protocol violation.
With the bound_ok/bound_fail events clients would instead receive this
event and could theoretically act upon it.
The race that this patch tries to overcome is that the gRPC client will
periodically attempt to verify if there's a shell-client already
connected to server by binding to agl_shell interface and waiting for
bound_fail event. In case it got bound_ok, it would disconnect and
attempt at latter point in time, until it got the bound_failed event, and thus
signalling that there's shell client already connected, allowing to
proceed further.
This worked fine most of the time, depending on how fast the shell
client also bind to agl_shell. For a brief period of time, it might be
that shell client also gets a bound_fail, requiring it to retry at a
later point in time. The disconnected/reconnect of the gRPC proxy would
then complicate matters as the client resources will get overwritten. So
rather than trying to try that fix that, a better approach is to
simplify the way this works entirely.
The change in this patch is that the gRPC proxy doesn't
connect/disconnect periodically but rather it waits for the compositor
to signal when it is ready to bind to agl_shell interface.
That happens with the help of the doas event status, from the
agl_shell_ext interface. If this event status is alright (OK) then it means
the gRPC can then bind to agl_shell interface.
If it gets a failed status it would just wait and then issue another
doas request and continue as such forever until it got an alright
status. The distinct is that in this case the gRPC proxy would not disconnect
and then reconnect retrying the same thing.
This change to simplify some of the assumption in server, and
client side implementation would just race with the shell client when
binding to the agl_shell interface.
Bug-AGL: SPEC-4977
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ib74f789553d3b130ee8e61d0068e617dc2209a58
|
|
And make sure we clear off the remaing client resources when doing an
unbind.
It seems we would hit it when checking set_background/ready/set_panel
requests, resulting in a protocol violation and finally terminating the
connection.
Bug-AGL: SPEC-4977
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie5ed881511ec2ac4501d2a5cac349abc7f83c1fe
|
|
This is unlikely to happen in practice, but discovered while doing a
code audit, so let's let be on the safe side and don't attempt to deref
as we'll get invalid memory.
Bug-AGL: SPEC-5018
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ib874a7194ab3a7019a304ec4c1974824c78b26cc
|
|
We haven't add an official release since the beginning of the year, when
we introduced the gRPC API. So do another one, as we've changed a bit
the say the gRPC starts.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Idc2feace89a0cd77d1788e629fff9b5f2f443fce
|
|
This would speed the time checking if agl-shell was bounded or not.
Shouldn't make that much of a difference but we do not need to wait 250
ms just for testing that.
Bug-AGL: SPEC-4912
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I8751c1d69898a82a415ba9b756bdfe9657ef0546
|
|
This change moves a bit the start-up sequence of the gRPC server and
when it connects to the compositor.
Changing the start-up sequence avoids waiting for the channel to change
its state from disconnected to connected, and only wait for the wayland
connection to take place. Otherwise, we would wait first for the wayland
connection to take place, then wait for the gRPC server to start up
and finally wait for the channel to be in connected state, all which
would incur a massive waiting time.
Moving it a bit early requires to at least verify that we have the proxy
side (the wayland connection) is already set-up at that time.
Bug-AGL: SPEC-4912
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ied88a917df8ff98fefa601103ce04e13c8bb21ac
|
|
These are not seen until enabling the DEBUG directive.
Bug-AGL: SPEC-4912
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic18c701909975978e82ef811ade416d802e567b5
|
|
Maybe the third time is a charm to avoid fall through and assume on the
exit path we do have a wl_display.
Bug-AGL: SPEC-4935
Reported-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Tested-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4adef5bf72d6b1a32a218bf1cfa6c8ed4450ba48
|
|
Commit d8e72099ecbcad, 'grpc-proxy: Terminate thread when we're
exiting', addressed a rather bigger issue to handle correctly the
shutdown/restart sequence. A consequence of that is the initial issue
opened in SPEC-4935 with a trace showing a protocol issue, due to fact
we're supplying an invalid wl_display without being connected to the
compositor.
While commit d8e72099ecbcad, 'grpc-proxy: Terminate thread when we're
exiting' does fix the issue and would make the underlying bug disappear
let's be more pedantic and don't attempt assume we have a compositor
connection when in fact we do not.
Bug-AGL: SPEC-4935
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id10dabe5178f52fa6a0cf6d70c70799c98f4b6d5
|
|
We need to be joining the thread to be able to exit properly, so let us
do that.
Bug-AGL: SPEC-4935
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ib4e54fcb23267b632f61c10d6ec2835c55ec2f23
|
|
This adds basic scaling for floating windows, sending new dimensions to
the clients to resize itself.
Bug-AGL: SPEC-4862
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic693153cd704b278dcddd2514afc8dafecf8829b
|
|
This adds basic movement for floating type of windows. The window needs
to be a floating type for this request to work out.
For the agl-shell protocol, this adds a set_app_float() request while
for gRPC it adds a SetAppPosition() request.
Bug-AGL: SPEC-4863
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5ecc4257c3e84d15a8cabb183757753be37867f5
|
|
Turns out weston doesn't install xwayland-api header if Xwayland is not
installed, which is a shame, and should be rectified. Meanwhile, let's
guard access to the header and the API that the header exports.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I77638b263483628f8cc7a3dcbd08c8947db1d86b
|
|
In accordance to the upstream changes refer to the logging context
rather than the compositor instance.
Depends on https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29064
Bug-AGL: SPEC-4861
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4a8aeac4ef33e0631c23ae85347fea8a1b36c4de
|
|
All app_ids are not valid for xwayland type of surfaces to need to check
against it.
Bug-AGL: SPEC-4847
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I84dc9b493648f4fe48b1c23c8ead0283505acce0
|
|
This provides a far better way of determining if the surface is
xwayland or not. We can then make sure all X11 clients can be displayed.
Bug-AGL: SPEC-4847
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I2140c452c0d37a84323eaf75787eb32a7771a56e
|
|
This allow starting up XWayland and the ability to display, albeit
is incomplete, given that we have no way at this moment to make the
window maximized, as we do with xdg-shell/native wayland applications.
A further patch, together with libweston changes are needed to make this
complete. For now this can provide us with initial smoke testing. Tested
with basic X11 clients, including Unigine, which is the reason for
having this the moment.
Note that this at the moment compiled-out, requiring the pass
-Dxwayland=true when building the compositor.
Bug-AGL: SPEC-4782
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I87d2a852165cb3f03482bea1e04931bdd6d4c115
|
|
The activation area can set-up with agl_shell as well, so give
the ini configuration file precedence over the one set-up by
agl_shell.
Bug-AGL: SPEC-4829
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ifae82b8c29575e7a9a06422588ad6a8cce80946e
|
|
Rather than doing that always, be more selective, and perform it if we
had already an application active.
Bug-AGL: SPEC-4829
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I707f92d1cc1f820af493bae9daa5a948aa452ad8
|
|
This is a temporary work-around for doing another read of the ini file
for the activation-area in case we detected that we have one set-up but
the activation area is empty. This happens when we're getting the ready()
request from the shell client, when we're initializing the layout.
Bug-AGL: SPEC-4829
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I152e7cba34b74390de2a46df4799c1fb44441d3f
|
|
Similar to Waltham, SMACK hasn't been really used and it was actually
a compile option, showing as a example the deny policy. The RBA and the
allow-all policy still available, and we can revisit the policy
mechanism if we plan on switching to SELinux.
Bug-AGL: SPEC-4806
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iedac63585676ebc47201debcf73870cb0538cc09
|
|
Waltham hasn't been used in a while, its support has been removed for
some time, we've been deprecating it last release so it's time to remove
it from the compositor as well.
Bug-AGL: SPEC-4669
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iaf1e467b1228051fd96cac424ac6781d67f9fefa
|
|
And split the screenshot in multiple files, to match each output.
Bug-AGL: SPEC-4788
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I6d9e545c05ff949900f0158720888eb757c2c271
|
|
Bug-AGL: SPEC-4593
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I79d4447b7768b72712e244504782a33ba257a33d
|
|
This brings in support to pass, over the command line, debug scopes
that can help out debug issues with HW with other components or with
libweston itself. One particular importance is the drm-backend debug
scope.
Bug-AGL: SPEC-4593
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I7a182ffe0b2b9bfdeced184514283265bb17c607
|
|
So far, we could start an application on a different output, but
moving them back-and-worth wasn't really supported. This handles
a few use-cases like:
- move an application's window from one output to another
- install black curtain in case we no longer have any other surfaces
on that output;
- deactivate and switch to the previous active window in case there's
one available
- the activation is handled by the shell client, while deactivation
is done implicitly by the compositor to simplify the shell client
This does a bit of rewording of a function that returns true whenever
we have only a single application window on a particular output.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I58cde58c6a2e2dade93566bfd7aff5ed697f5450
|
|
Checking both width and height isn't a strict requirement, either can
different. This unties the check such that we can actually move
windows/applications between different outputs.
We also add here an explicit surface damage as we're removing the view
from the layer.
Bug-AGL: SPEC-4773
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie91b8c0fd2e9357fe00fd693e2a70fa3b4b4d31a
|
|
Some applications, set up their app_ids after the initial surface
commit, which is too late to move them/place them to a different output.
This addresses that in the case the application sets one up, after the
initial surface commit.
Bug-AGL: SPEC-4759
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4762af1ba6e8708722385ac06c37486dd4b6aac1
|
|
A while ago we switched to activation-by-default turned off which passes
the responsability of activating applications to the shell client. The
shell client uses the app_id to indentify the application to display,
and the output.
The output would normally be hard-coded to the first available output
but there is nothing that prevents the shell to display it on other
outputs.
This patch does just that, it would allow the user use configurable
option in the ini file, under the [output], agl-shell-app-id=app_id, by
re-using the event from the compositor sent to the shell client to
pick up a different output, the one specified in the section entry.
Bug-AGL: SPEC-4529
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ieea1a28fe6776ecc691fd38da9b4c3495ac5a5ea
|
|
Though there's no difference between the desktop and remote role this
would simplify handling, and with it we remove the implicit activation
of surfaces, which wasn't addressed when we switched to
activate-by-default=false by default.
Bug-AGL: SPEC-4673, SPEC-4759, SPEC-4529, SPEC-4756
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia5e57155ed26c53958e0e9590be04f91c5de1c28
|
|
This is identical to the remote role, but I feel this conveys more
information than remote role, as remote denotes that the output is
displayed on another device, which it isn't always the case (the
system has multiple outputs all connected directly).
This introduces two new additions to the agl-shell protocol, a request
to use a different output to display/show the application and an event
to inform the shell client to use as a map between the application id
and its output. The event is necessary to let the shell client know
which output to activate the application on.
This requests implements a wrapper for gRPC that maps 1-to-1 to the
agl-shell request. There's no gRPC subscription similar to the event
though.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I070e9fdbafd5616f3a98415193bf846aeaee9a4a
|
|
In case we couldn't enable the output do not return early without
setting the proper return value. This causes an issue later one, because
the signal list isn't initalized, taking down the compositor with a crash.
Bug-AGL: SPEC-4734
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia5ebc226f6b8f702e710a5976c471d04302bcb00
|
|
Required when building the compositor locally, without yocto/OE as
weston cflags includes the full path to weston.
Bug-AGL: SPEC-4725
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If3a4e8238cb40c6fbe0db26bd1056fce48243038
|
|
This forces to create a include directory by hand, which we don't seem
to be needing. This only affected the cases where we build the
compositor locally, without yocto/OE.
Bug-AGL: SPEC-4725
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic279714671809eae2362da9fccaf592f10f2b888
|
|
This implements set_app_fullscreen which clients can set-up before being
mapped.
The worthwhile change here was the fact that transitioning between
fullscreen, normal, and float would cause invalid tracking of the active
window when switching between these states. This would make floating
operation display the incorrect active window, so in order to reconcile
that, we only update the previous surface if it is different that the
current active one. Otherwise this fairly similar to set_app_float.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie912c86ff7ac38d034cf4d97b2adbc5ef47ce9d3
|
|
When resetting back to normal, maximized state, reset also the state,
just in case we might to check it up latter on.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I0107e6963c01bde22a5a3ab30f392cb618a4f258
|
|
This request allows transitioning back from other roles like
float/split/fullscreen to regular maximized, normal state.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Id7f04ffee193677621bd32860998457498acc388
|
|
Add support for setting a window as float/popup. This allows either the
application itself be set-up as float, or from other gRPC clients.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic7ee8203cd9c4dfcc51b7fc9709f35be504ae9d0
|
|
This request will hide the currently active window, and activate
either the background or the previously active window.
This request mimics the agl-shell-desktop request, actually using the
same code path. It only handles regular windows and float/pop-up. Once
we add other roles like fullscreen/split we can improve on this.
Bug-AGL: SPEC-4673
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I593cda5d008dfc32fe5e3b079fad9450dc1a490d
|
|
In order to send correct dimensions after a hot-plug event, we need to
be able to save the area we had before.
Note that implies that the connectors do not change names in between
hot-plugs, which normally doesn't happen, but it might if udev rules are
executed/invoked. We restore based on output name it had previously.
Bug-AGL: SPEC-4705
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ice3a127edfc9d356830ba8f0d0a20bb86284d7de
|
|
A hot-plug/re-plug event means we remove the black curtain with it the
ivi_surface that hangs out of it, so verify it before assuming there's
one installed.
Bug-AGL: SPEC-4705
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iad53ae34b4e15b5962cf984978a65c344aac9200
|
|
Connector hot-plugging would generate new wl_output object, which the
client might re-use so rather than blindly trusting the client, make
sure that the output we're getting is really one suitable.
This should avoid getting an incorrect output upon re-plugging in a
connector.
Bug-AGL: SPEC-4705
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I732283fc16841e0e57ddbec5d8bd2333d5028433
|
|
Turns out we're leaking out the app_ids when disabling the output so
turn that memleak off.
Bug-AGL: SPEC-4705
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia2d46ecd1748c078e924d8d6c90bd86e9c49f64c
|
|
Verify if more than one app_id is being passed in the agl-shell-app-id
to allow more than one appid being placed to that output.
Bug-AGL: SPEC-4666
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I79dc77564ffca41148832af597b6836d7d28f686
|
|
Waltham isn't really used, this is a step forward removing
support for it. For now just add an configuration option if users still
want to use it.
Bug-AGL: SPEC-4670
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5ec900ef075717b438ef9e41167ad4833b2a8b87
|
|
We should probably cut and update the compositor to a newer version
as gRPC support is a big change to have.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iac400a3d2f0e62c5fe3b2ab0f681ce228a1865db
|
|
Re-starting the shell client wouldn't reset the activation area, which
might be rather confusing, so better be re-initialize it as to be able to
switch in-between various configurations.
Bug-AGL: SPEC-4674
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ib964ebed2c189f82092ffcf4d54dee2cf22093e1
|
|
Some additional checks to avoid cases where agl-shell is still
using the version 1 but we're checking against at least version 2 (where
we introduced some additional events). Part of the compat series.
Bug-AGL: SPEC-4667
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4f5d34fd8b9fe6cf6b8097948afebee550f5345d
|
|
Turns out I made a mistake making all clients with version 1
not able to bind to agl-shell anymore. Rather than doing that still
allow older clients to bind to agl-shell.
Bug-AGL: SPEC-4667
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I61224f39dd8b0d96b36695f536eed8e701130877
|