summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-04-27grpc-proxy: Added set_app_output requestMarius Vlad8-10/+145
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
2023-04-06compositor: Don't reuse previous return valuesMarius Vlad1-1/+1
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
2023-03-15meson.build: Add an explicit weston dependencyMarius Vlad4-3/+4
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
2023-03-15meson.build: Remove any prefix assumptionsMarius Vlad1-15/+0
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
2023-03-03grpc-proxy: Add set_app_fullscreen functionalityMarius Vlad9-8/+157
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
2023-03-03shell: Reset normal state when getting back to maximizedMarius Vlad1-0/+1
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
2023-03-01protocol: Add set_app_normal requestMarius Vlad8-0/+97
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
2023-03-01protocol, grpc-proxy: Add support for set_app_floatMarius Vlad9-8/+122
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
2023-03-01protocol/grpc-proxy: Add deactivate_app requestMarius Vlad4-6/+36
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
2023-02-15compositor: Added layout_save/layout_restoreMarius Vlad3-0/+99
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
2023-02-15shell: Check for a valid ivi_surfaceMarius Vlad1-1/+2
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
2023-02-15shell: Check for invalid outputs passed on when activatingMarius Vlad1-4/+14
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
2023-02-15compositor: Fix memleak when disabling the outputMarius Vlad1-0/+1
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
2023-01-29ivi-compositor: Add support for multiple app_idsMarius Vlad3-8/+29
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
2023-01-29meson: Deprecate waltham and inform users of thatMarius Vlad2-1/+10
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
2023-01-29meson: Bump to version 0.0.21Marius Vlad1-2/+2
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
2023-01-17shell: Reset the area activationMarius Vlad1-0/+3
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
2023-01-05shell: Verify agl-shell version for bound_ok/bound_failMarius Vlad1-7/+18
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
2023-01-05shell: Add fallback agl-shell version 1Marius Vlad1-0/+5
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
2022-12-28input: Fix minor issue while reporting disable cursorMarius Vlad1-2/+2
We actually reported the cursor being disabled when it fact it was not. Bug-AGL: SPEC-4658 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I81ee23e4ef2621c96344ce526a7b53d235d325e3
2022-12-28input: Rename hide-cursor to disable-cursorMarius Vlad3-17/+18
Since hide-cursor doesn't hide the cursor but disables the pointer, better rename it to something much more appropriate. While doing that, move also move the ini entry retrieval where is also more suitable, along side the other parts that do that. Shouldn't be any functional change while doing that. Bug-AGL: SPEC-4658 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I8d1aab849b9a96177d17bb639c8e1e209205f7e7
2022-12-14src: Verify if the output is presentMarius Vlad1-3/+4
The output destroy handler will invalidate the weston output and with it we're no longer have access to it when the shell client closes up. This checks against the weston output to avoid an illegal memory access. Still part of the hot-plug connector fixes. Bug-AGL: SPEC-4625 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reported-by: Detlev Casanova <detlev.casanova@collabora.com> Change-Id: Ic4c389422057fa082aff7fdbbc13af0c16f7bbb6
2022-12-14src: Further hotplug connector fixesMarius Vlad2-5/+9
Some further checks for the black curtain not being present always when perform hot-plugging operations. Bug-AGL: SPEC-4625 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reported-by: Detlev Casanova <detlev.casanova@collabora.com> Change-Id: Ia7c05e5b90b9e8260f661a8115a93b0d246b9d98
2022-12-13grpc-proxy: Init gRPCsandbox/mvlad/grpc-async-cbMarius Vlad11-0/+1144
This brings in support for accessing agl-shell protocol indirectly by using a gRPC interface which bridges the communication between a particular client (the client issuing gRPC requests) and the AGL compositor which does that by re-using the same agl-shell protocol. In order to achieve that, and further more, to avoid having ifdefs code in the compositor and deal with threading, we instead resorted to using a helper client. On one side this helper implements the gRPC server API, and on the other, a wayland native client that implements the agl_shell interface. It uses the agl_shell_ext interface added previously to communicate with the compositor that it requires access to agl_shell interface as well. The helper expects that agl_shell interface was already bounded to another client before starting it so it waits until that happens and then it implements the protocol specification, for each interface. Launching the helper client automatically can be done by adding the following entry to the ini file: [shell-client-ext] command=/path/to/agl-shell-grpc-server The gRPC server implementation only handles the agl_shell interface until to this point, specifically, the activate_app request, and the events that were adedd with version 3 of the agl-shell protocol. Also the implementation uses the Reactor pattern, with Callback service that greatly simplifies the async version and avoids putting locks to to handle multiple clients. This should allow multiple clients being connected to the gRPC server and receive events / send requests. Bug-AGL: SPEC-4503 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ie870da3caa138394d8dd30f9d22a5552d585d63a
2022-12-05shell: Not not override the agl_shell interface resourcesMarius Vlad1-22/+30
This redoes a bit the way we assigned wl_resources created in case we got a bound_ok or bound_fail event. Previously, even if we get a 'bound_fail' event we would override the shell_client.resource which would make activation of the legitimate shell client impossible, so this change would make the shell_client.resource not being set if that happens. Secondly, this includes a reset change in the agl_shell destructor, a reset which is implicitly being done when the correct operations for the protocol specifications have been applied. Bug-AGL: SPEC-4503 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ie87ce3b937f041a5704407593f580895f188ef56
2022-12-05shell: Add a wrappers for sending events with agl-shellMarius Vlad4-25/+31
As we now have one more (shell) client that can bind to agl-shell, add a wrapper for sending the events and include it as well. Bug-AGL: SPEC-4503 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I869b036d6f24beeb3089bfd24b8d233c5fada71f
2022-12-05compositor: Allow to start other clientsMarius Vlad3-10/+14
This introduces shell-client-ext as a new section entry to add to allow starting the gRPC server helper client. Bug-AGL: SPEC-4503 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I41d62c932648699aa21837afc2de5103912c370d
2022-12-05agl-shell.xml: Introduce a new interfaceMarius Vlad3-7/+150
In order to allow another other client bind to agl_shell interface, this introduces a new specific interface which the client would bind to first, issue a doas_shell_client request, wait for a response, and proceeed further if the event received was successful. Afterwards, the client can bind to agl_shell protocol (and assuming it got 'bound_ok' event back) can further use the agl_shell protocol as it happens with the shell client. This approach avoids adding a new protocol interface and instead re-uses the same interface, with the note that the shell client is still in charge of handling background and panels. Bug-AGL: SPEC-4503 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iac1d840a5f917b2a92fdfbdcdc583144d3942a1c
2022-11-25compositor: Handle output destruction deferralMarius Vlad1-1/+14
weston_head_detach() already handles the disable of the output if it's the last one. See also: https://gitlab.freedesktop.org/wayland/weston/-/issues/697 Bug-AGL: SPEC-4625 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I542b14905b7b6aa220142d0d2dd5cec922c4fc33
2022-11-14layout: Allow background surface roles (to) be activatedMarius Vlad2-8/+35
While nothing technically prevents the background surface role to be activated, it turns out we don't actually track it so we a) couldn't find it, and b) we attempted to resize it to an incorrect dimension. Another small follow-up commit from 'Add manual activation area configuration option' and with with commit 'agl-shell: Add support for defining an activation area', which introduced the ability to designate a certain area as the activation area. v2: Keep the background surface always mapped We now have more than one active surfaces at the same time, so we can't unmap it as it needs to be always displayed. Bug-AGL: SPEC-4594 Reported-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2561ce2c4c1c96c796fb8ee1c8ca9a30772b71f9
2022-11-01agl-shell: Add support for defining an activation areaMarius Vlad2-4/+50
This introduces a new request, 'set_activate_region' that hints to the compositor to use a defined rectangle area, rather than to infer it. This is a follow-up from commit 924473ef016ba8dcfa863, 'Add manual activation area configuration option' which brough in the same feature but by using the ini configuration file. Bug-AGL: SPEC-4594 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If9395268e68de6b0d01f04b90822e06603808299
2022-10-12Add manual activation area configuration optionScott Murray3-11/+59
Add a per-output "activation-area" configuration option that can be used to define the activation area for applications that are not using panels. Notes: - A new surface is not created for the given activation area, so apps that are not opaque will show the background. After some thought, this seems like acceptable behavior, but it is possible that I am missing something. - At present setting the activation area explicitly disables use of any panels, this may not need to be the case and some discussion with the AGL community with respect to requirements is likely needed. - It is likely that this feature should be done via a agl-shell protocol call instead of via configuration, but doing so will require some thought as to the interaction with panels and how configuration errors would be communicated back to a client. Bug-AGL: SPEC-4588 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I6cdae659f5f7636dc94121a69666b905abda3be3
2022-09-23compositor: Use sigaction to trap SIGINTMarius Vlad1-1/+23
signalfd interacts badly with gdb's signal trapping - when hitting ctrl-c in a debugger attached to weston, weston will receive the signal. This results in weston exiting cleanly when the intent was to use gdb to interfere with its operation. Trapping SIGINT was introduced in commit 50dc6989 which ensured we would call wl_display_terminate() on SIGINT or SIGTERM to clean up our socket. Killing weston with SIGINT is quite common for several developers, so it's important to preserve this clean shutdown behaviour, so we can't naively stop trapping SIGINT entirely. Instead, use the sigaction() function to trap SIGINT, and have the SIGINT handler send weston SIGUSR2 (SIGUSR1 is already used by xwayland). SIGUSR2 can be trapped in the proper wayland way via wl_event_loop_add_signal(). This way we can properly break our event loop and clean up on SIGINT, but we can also have gdb intercept SIGINT. There are other ways around this, but I'm hoping this one allows people to continue using ctrl-c to stop weston, and doesn't require additional project specific gdb knowledge. Bug-AGL: SPEC-4570 Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I42fc186296856861c8b6aee54a302c7c0574a88d
2022-09-23compositor: Add missing SIGCHLD handlerMarius Vlad3-1/+37
We seem to be missing a SIGCHLD signal handlers so this patch adds one similarity to what weston has. Bug-AGL: SPEC-4570 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I137af4199c3d543fed940bbe289989095b114b74
2022-09-23compositor: Stop trapping SIGQUITMarius Vlad1-3/+1
We've been trapping SIGQUIT for a "clean shutdown" since commit 3cad436a However, sources such as: http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html indicate we probably shouldn't be trapping it at all, as the intent of SIGQUIT is to leave a core file and debug artifacts from the run. We should perform the minimal amount of clean up to ensure the system isn't left in an unusable state - but these days that's performed by other software such as logind. We can safely stop trapping SIGQUIT entirely. (Based on work from https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/817) Bug-AGL: SPEC-4570 Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Icf7d4f3e76a58e781bad911a966b65e2798266d0
2022-09-23shell: Rewrite client_exec as client_launchMarius Vlad4-57/+147
This patch is a major rewrite of the client_exec which fixes a couple of issues found by upstream. Specifically this address the following two issues: - Do not weston_log() after fork() - Own the session for the launched client These two issues were integrated into this single patch. It makes use of previously added wrappers to handle custom environment being passed to the (shell) client being executed. (Based on the work from https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/954 and from https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/817) Bug-AGL: SPEC-4509 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I29d4bcacba3671f67bb915bdb55a80b556e143ac
2022-09-23process-util: Move Xwayland fork helpers to sharedMarius Vlad2-0/+364
We'll want to reuse these inside desktop-shell as well as the Weston frontend. (Based on the work from https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/954) Bug-AGL: SPEC-4510 Signed-off-by: Daniel Stone <daniel.stone@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ife13dce545928cf53e4f49a657b756ed88ee742f
2022-09-22shared: add str_printf()Marius Vlad1-0/+26
asprintf() has the problem that it leaves *strp undefined when it fails. Here is a simple wrapper that ensures NULL if asprintf() fails, which is much more convenient to use. This will be useful in future patches, where one needs to return error messages from maybe failing functions, and more. Bug-AGL: SPEC-4510 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2e689551797da525d110a51b02fd608c9e07c567
2022-09-22shared: introduce os_fd_clear_cloexec()Marius Vlad2-0/+18
This function will be used between fork() and exec() to remove the close-on-exec flag. The first user will be compositor/xwayland.c. Bug-AGL: SPEC-4510 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ib2245394654651583f9d59785540962ae4cb8a28
2022-09-22desktop: Do not attempt to send terminate eventMarius Vlad1-1/+3
For cases where the shell client itself is stopped/terminated or the compositor is taken down, and implicitly with it, the shell client we won't really have a reasource available. Use the shell_ready flag to verify that. Fixes: 0512e7251611e7040c55 Bug-AGL: SPEC-4528 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I78b4fb39a76402535e642dda9cf284b57856376d
2022-09-14protocol/agl-shell.xml: Add an app_state event -- app state notificationMarius Vlad4-4/+54
This protocol bump will notify the client binding to the agl-shell protocol when a particular application changed its state. This includes four (4) different events: - started - terminated - activated - deactivated This should allow orchestrating start-up with activation as we don't really know when it would be the proper time to activate an application when starting up (for the first time). A started event will notify the shell client we it can do that. These events are not sticky such that the shell would be responsabile for keep track of the state, if it wants to. Bug-AGL: SPEC-4528 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id162874fa68946bb9b1db9fa356dd617a0db9eb7
2022-09-14layout: Handle dynamic application/surface movement between outputsMarius Vlad1-1/+24
This patch takes care of dynamically moving applications from one output to another, by tracking the output which was used activation finalisation. It also logs when we detect that we keep having the same surface active on the output. Bug-AGL: SPEC-4516 Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ic4ce7d56fa360f2bddc087a1af83fc32728cc95d
2022-09-14shell: Remove the black curtain installed on outputsMarius Vlad4-20/+60
Upon completion of activation we might have an output without a background surface set-up on that particular output, so this patch either uses the black curtain as a background surface (useful for transparent applications, which need it) or we remove it entirely in case the shell client has one installed. The patch renames the black_surface to black_curtain to better reflect its name. Also output filtering would need renaming (desktop_surface_check_last_surfaces) Bug-AGL: SPEC-4516 Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I6071b07664772d891a4d8c33a7603573ec2069fa
2022-09-14layout: Detect when an application should be migrated to other outputsMarius Vlad2-2/+35
This patch adds a way to determine when to move out/migrate the window to another output, different than one set previously, or where it was initially added. This patch only adds support for resizing with a later patch touch the final activation part. Uses new output variable to track it the outputs. We send new dimensions of the output if they do not match the previous/older recorded one. Bug-AGL: SPEC-4516 Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ic5b6b9c1676543fa5ff1524f58e014ad8abb632b
2022-09-14desktop: Avoid sending the dimensions for the first outputMarius Vlad1-1/+4
Rather than sending the first available output we have in the system, use explicitly the output that we specified in the configuration for that particular appid. If we didn't do that, we would first send the dimension for the first output, after which we send the dimensions for the correct output, resulting in a few configure exchanges between the client and the compositor. This fixes that by using the correct output from the beginning. Bug-AGL: SPEC-4520 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If796f1ce8ba069d4fd2c73a7bdfd42e94c9e0418
2022-09-14layout: State explicity the outputMarius Vlad1-5/+7
No functional changes, just print out in the logs what output is being explicitly used. Bug-AGL: SPEC-4520 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I39d3645f287e16c99ded6f0246a6f0d8929fa6eb
2022-09-14layout: Use view's mapping once we placed the view in the hidden layerMarius Vlad1-8/+9
This avoids re-sending the dimensions until the client acks the new dimensions. It avoids some innocuous logging. Bug-AGL: SPEC-4520 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Icc8d7a2d8effc09ffe9dc5bee9b586f752e2bfcd
2022-09-14desktop: Install a black background for REMOTE rolesMarius Vlad1-4/+2
A while back we added the ability to install a black curtain if there no applications running. This way it provides a visual cue and it signifies that the applications is no longer running. While the idea was to install a remote black background for the REMOTE role, it turns out this would only happened if we were using the Waltham output type, which is excluding the REMOTE role. Adds an explicit check for Waltham to still allow for cases where just the REMOTE role is used. Bug-AGL: SPEC-4520 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I42951faa7cfb6932fa0e42e75f79245a82181f06
2022-09-14desktop: Include REMOTE role in initial configurationMarius Vlad1-1/+2
The REMOTE role is identical to the DESKTOP one (its merely a tag), so it should go in the same category. Fixes 13ac8bab43fffd00. Bug-AGL: SPEC-4520 Reported-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iddf7b5ba644cb7317c5f5ac6645c0f149ab1d05d
2022-08-31agl-shell: Add bound_ok and bound_fail events and a default destructorMarius Vlad4-12/+142
As we're increasing the amount of combinations we could have in the AGL platforms, in which we're mixing various platforms, we require a way to tell clients that there's already a shell client which in charge. We can't really have multiple shell clients managing the windows and surfaces, but in the same time we don't want to sever the wayland connection the way it happens currently. Racy alternatives might exist, which avoid advertising the interface altogether once a client did bind to the interface but that's not really a viable solution. So instead of doing that, this patch introduces two new events which tells the client that it was either successful, and it can continue issue requests and receive events or a that it the bind failed. The client can chose to wait and try later and abandon to bind to the agl_shell intefface, and behave like a regular client. While doing an update to protocol to add those two events this patch add also a default destructor for the protocol. Bug-AGL: SPEC-4502 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iacb86a668d1c4630724eecdb18e4b4c2d4e8e34a