summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-01-31 19:10:34 +0200
committerMarius Vlad <marius.vlad@collabora.com>2024-02-22 13:51:33 +0000
commit000b725db81ae79ffec0a7a84a2c4aab2778dc82 (patch)
treecdcbd2f10846bf126ad0a5c598101e7d37ea2390
parentb87f46acc5b0b252e4642f2130ef3093294afac8 (diff)
grpc-proxy/shell: Add sticky parameter when setting up split window
This allow to further customize how to handle the split window. There's no implementation in the compositor for allow this functionality to take place, but doing so can be at a later point in time. Tagging the split window as sticky should allow activation of other windows while keeping the split window always displayed. Bug-AGL: SPEC-4839 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iae4d18d2a857497c11d0e77bf43f654e2b8ed501
-rw-r--r--grpc-proxy/agl_shell.proto3
-rw-r--r--grpc-proxy/grpc-async-cb.cpp4
-rw-r--r--grpc-proxy/shell.cpp5
-rw-r--r--grpc-proxy/shell.h3
-rw-r--r--protocol/agl-shell.xml6
-rw-r--r--src/shell.c2
6 files changed, 17 insertions, 6 deletions
diff --git a/grpc-proxy/agl_shell.proto b/grpc-proxy/agl_shell.proto
index c8d57ac..d38d896 100644
--- a/grpc-proxy/agl_shell.proto
+++ b/grpc-proxy/agl_shell.proto
@@ -37,7 +37,8 @@ message SplitRequest {
string app_id = 1;
int32 tile_orientation = 2;
int32 width = 3;
- string output_name = 4;
+ int32 sticky = 4;
+ string output_name = 5;
}
message SplitResponse {
diff --git a/grpc-proxy/grpc-async-cb.cpp b/grpc-proxy/grpc-async-cb.cpp
index 23a293d..6807564 100644
--- a/grpc-proxy/grpc-async-cb.cpp
+++ b/grpc-proxy/grpc-async-cb.cpp
@@ -225,7 +225,9 @@ GrpcServiceImpl::SetAppSplit(grpc::CallbackServerContext *context,
LOG("m_aglShell not set-up\n");
return nullptr;
}
- m_aglShell->SetAppSplit(request->app_id(), request->tile_orientation(), request->width(), request->output_name());
+ m_aglShell->SetAppSplit(request->app_id(), request->tile_orientation(),
+ request->width(), request->sticky(),
+ request->output_name());
grpc::ServerUnaryReactor* reactor = context->DefaultReactor();
reactor->Finish(grpc::Status::OK);
diff --git a/grpc-proxy/shell.cpp b/grpc-proxy/shell.cpp
index 6dffe6b..7267d70 100644
--- a/grpc-proxy/shell.cpp
+++ b/grpc-proxy/shell.cpp
@@ -140,7 +140,8 @@ Shell::SetAppScale(const std::string &app_id,
}
void
-Shell::SetAppSplit(const std::string &app_id, uint32_t orientation, uint32_t width, const std::string &output_name)
+Shell::SetAppSplit(const std::string &app_id, uint32_t orientation,
+ uint32_t width, uint32_t sticky, const std::string &output_name)
{
struct window_output *woutput, *w_output;
struct agl_shell *shell = this->m_shell.get();
@@ -161,6 +162,6 @@ Shell::SetAppSplit(const std::string &app_id, uint32_t orientation, uint32_t wid
w_output, link);
- agl_shell_set_app_split(shell, app_id.c_str(), orientation, width, w_output->output);
+ agl_shell_set_app_split(shell, app_id.c_str(), orientation, width, sticky, w_output->output);
wl_display_flush(m_shell_data->wl_display);
}
diff --git a/grpc-proxy/shell.h b/grpc-proxy/shell.h
index f428088..fc02f25 100644
--- a/grpc-proxy/shell.h
+++ b/grpc-proxy/shell.h
@@ -40,7 +40,8 @@ public:
m_shell(shell), m_shell_data(sh_data) { }
void ActivateApp(const std::string &app_id, const std::string &output_name);
void DeactivateApp(const std::string &app_id);
- void SetAppSplit(const std::string &app_id, uint32_t orientation, uint32_t width, const std::string &output_name);
+ void SetAppSplit(const std::string &app_id, uint32_t orientation,
+ uint32_t width, uint32_t sticky, const std::string &output_name);
void SetAppFloat(const std::string &app_id,
int32_t x_pos, int32_t y_pos);
void SetAppNormal(const std::string &app_id);
diff --git a/protocol/agl-shell.xml b/protocol/agl-shell.xml
index 4f71a51..f392691 100644
--- a/protocol/agl-shell.xml
+++ b/protocol/agl-shell.xml
@@ -410,12 +410,18 @@
width can't exceed the output width value, or the compositor can choose
to ignore this value.
+ Making the split window sticky would inform the compositor that the
+ window should always be active when switching or when activating between
+ other windows. This would allow navigating, starting and activating other
+ windows while keeping the current window always in a split state.
+
See xdg_toplevel.set_app_id from the xdg-shell protocol for a
description of app_id.
</description>
<arg name="app_id" type="string"/>
<arg name="orientation" type="uint" enum="tile_orientation"/>
<arg name="width" type="int" summary="width of the window being split"/>
+ <arg name="sticky" type="int" summary="make the split window stiky"/>
<arg name="output" type="object" interface="wl_output"/>
</request>
</interface>
diff --git a/src/shell.c b/src/shell.c
index 13c03f0..cce4dec 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1897,7 +1897,7 @@ shell_ivi_surf_count_split_surfaces(struct ivi_compositor *ivi)
static
void shell_set_app_split(struct wl_client *client, struct wl_resource *res,
const char *app_id, uint32_t orientation, int32_t width,
- struct wl_resource *output_res)
+ int32_t sticky, struct wl_resource *output_res)
{
struct ivi_surface *surf;
struct ivi_compositor *ivi = wl_resource_get_user_data(res);