summaryrefslogtreecommitdiffstats
path: root/grpc-proxy
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-01-31 14:15:02 +0200
committerMarius Vlad <marius.vlad@collabora.com>2024-02-22 13:51:33 +0000
commitb87f46acc5b0b252e4642f2130ef3093294afac8 (patch)
treecad2a4c6490281b803b68ead719ab33477a6f8e4 /grpc-proxy
parent083ee3d2b88f49612dfab230990e54c3edbf3aef (diff)
grpc-proxy/shell: Add width for split window
It might be useful in the future to let clients choose how much of the window to split so allow passing that. Note that there's no actual implementation but if there's a need in the future it can be easily added so it's better to add this now. Bug-AGL: SPEC-4839 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I82f36e86f56b0a65cbacac8368b63f68df69a350
Diffstat (limited to 'grpc-proxy')
-rw-r--r--grpc-proxy/agl_shell.proto3
-rw-r--r--grpc-proxy/grpc-async-cb.cpp2
-rw-r--r--grpc-proxy/shell.cpp4
-rw-r--r--grpc-proxy/shell.h2
4 files changed, 6 insertions, 5 deletions
diff --git a/grpc-proxy/agl_shell.proto b/grpc-proxy/agl_shell.proto
index cb9f191..c8d57ac 100644
--- a/grpc-proxy/agl_shell.proto
+++ b/grpc-proxy/agl_shell.proto
@@ -36,7 +36,8 @@ message DeactivateResponse {
message SplitRequest {
string app_id = 1;
int32 tile_orientation = 2;
- string output_name = 3;
+ int32 width = 3;
+ string output_name = 4;
}
message SplitResponse {
diff --git a/grpc-proxy/grpc-async-cb.cpp b/grpc-proxy/grpc-async-cb.cpp
index 8c4ed24..23a293d 100644
--- a/grpc-proxy/grpc-async-cb.cpp
+++ b/grpc-proxy/grpc-async-cb.cpp
@@ -225,7 +225,7 @@ GrpcServiceImpl::SetAppSplit(grpc::CallbackServerContext *context,
LOG("m_aglShell not set-up\n");
return nullptr;
}
- m_aglShell->SetAppSplit(request->app_id(), request->tile_orientation(), request->output_name());
+ m_aglShell->SetAppSplit(request->app_id(), request->tile_orientation(), request->width(), 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 8e78b20..6dffe6b 100644
--- a/grpc-proxy/shell.cpp
+++ b/grpc-proxy/shell.cpp
@@ -140,7 +140,7 @@ Shell::SetAppScale(const std::string &app_id,
}
void
-Shell::SetAppSplit(const std::string &app_id, uint32_t orientation, const std::string &output_name)
+Shell::SetAppSplit(const std::string &app_id, uint32_t orientation, uint32_t width, const std::string &output_name)
{
struct window_output *woutput, *w_output;
struct agl_shell *shell = this->m_shell.get();
@@ -161,6 +161,6 @@ Shell::SetAppSplit(const std::string &app_id, uint32_t orientation, const std::s
w_output, link);
- agl_shell_set_app_split(shell, app_id.c_str(), orientation, w_output->output);
+ agl_shell_set_app_split(shell, app_id.c_str(), orientation, width, w_output->output);
wl_display_flush(m_shell_data->wl_display);
}
diff --git a/grpc-proxy/shell.h b/grpc-proxy/shell.h
index 587ed90..f428088 100644
--- a/grpc-proxy/shell.h
+++ b/grpc-proxy/shell.h
@@ -40,7 +40,7 @@ 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, const std::string &output_name);
+ void SetAppSplit(const std::string &app_id, uint32_t orientation, uint32_t width, 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);