summaryrefslogtreecommitdiffstats
path: root/grpc-proxy
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2023-01-20 13:34:00 +0200
committerMarius Vlad <marius.vlad@collabora.com>2023-03-01 12:38:14 +0200
commit65fc5191f046ad8c7ba1bfd9e2e75afb925b4a21 (patch)
tree447de644e8e288ade0c9da629efb15a4cb8a408f /grpc-proxy
parent28ec0cff16d62260fb1a5900f57353f48446e199 (diff)
protocol/grpc-proxy: Add deactivate_app request
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
Diffstat (limited to 'grpc-proxy')
-rw-r--r--grpc-proxy/main-grpc.cpp4
-rw-r--r--grpc-proxy/shell.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/grpc-proxy/main-grpc.cpp b/grpc-proxy/main-grpc.cpp
index a59c282..d094be5 100644
--- a/grpc-proxy/main-grpc.cpp
+++ b/grpc-proxy/main-grpc.cpp
@@ -260,7 +260,7 @@ global_add(void *data, struct wl_registry *reg, uint32_t id,
sh->shell =
static_cast<struct agl_shell *>(wl_registry_bind(reg, id,
&agl_shell_interface,
- std::min(static_cast<uint32_t>(3), version)));
+ std::min(static_cast<uint32_t>(5), version)));
agl_shell_add_listener(sh->shell, &shell_listener, data);
sh->version = version;
} else if (strcmp(interface, "wl_output") == 0) {
@@ -284,7 +284,7 @@ global_add_init(void *data, struct wl_registry *reg, uint32_t id,
sh->shell =
static_cast<struct agl_shell *>(wl_registry_bind(reg, id,
&agl_shell_interface,
- std::min(static_cast<uint32_t>(3), version)));
+ std::min(static_cast<uint32_t>(5), version)));
agl_shell_add_listener(sh->shell, &shell_listener_init, data);
sh->version = version;
}
diff --git a/grpc-proxy/shell.cpp b/grpc-proxy/shell.cpp
index cc6ead6..b96ac39 100644
--- a/grpc-proxy/shell.cpp
+++ b/grpc-proxy/shell.cpp
@@ -61,7 +61,10 @@ Shell::ActivateApp(const std::string &app_id, const std::string &output_name)
void
Shell::DeactivateApp(const std::string &app_id)
{
- (void) app_id;
+ struct agl_shell *shell = this->m_shell.get();
+
+ agl_shell_deactivate_app(shell, app_id.c_str());
+ wl_display_flush(m_shell_data->wl_display);
}
void