Make use of the gRPC API and allow the user to start the camera as
floating/dialog type of window.
This has the side effect requiring an initial resize values. We didn't
need to do that because we always had to be resized to a maximum but now
we need to have an initial value as well.
Bug-AGL: SPEC-4987
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I3df8f0887425d461b6d812a429da6ce10fa1e00d
#include "utils.h"
#include "xdg-shell-client-protocol.h"
#include "utils.h"
#include "xdg-shell-client-protocol.h"
+#include "AglShellGrpcClient.h"
buffer->height = height;
fprintf(stdout, "Created shm buffer with width %d, height %d\n", width, height);
buffer->height = height;
fprintf(stdout, "Created shm buffer with width %d, height %d\n", width, height);
window->display = display;
window->width = width;
window->height = height;
window->display = display;
window->width = width;
window->height = height;
+ window->init_width = width;
+ window->init_height = height;
window->surface = wl_compositor_create_surface(display->wl_compositor);
if (display->wm_base) {
window->surface = wl_compositor_create_surface(display->wl_compositor);
if (display->wm_base) {
struct window* window;
const char* app_id = "camera-gstreamer";
struct window* window;
const char* app_id = "camera-gstreamer";
+ // for starting the application from the beginning, with a diffrent
+ // role we need to handle that creating the main window
+ if (argc >= 2 && strcmp(argv[1], "float") == 0) {
+ GrpcClient *client = new GrpcClient();
+ client->SetAppFloat(std::string(app_id), 30, 400);
+ }
+
sa.sa_sigaction = signal_int;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESETHAND | SA_SIGINFO;
sa.sa_sigaction = signal_int;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESETHAND | SA_SIGINFO;