Skip to content

Commit

Permalink
Add option to disable resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed Nov 3, 2024
1 parent 4f4d1ef commit 64be1a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ struct wayvnc {
bool overlay_cursor;
int max_rate;
bool enable_gpu_features;
bool enable_resizing;

struct wayvnc_client* master_layout_client;

Expand Down Expand Up @@ -934,7 +935,8 @@ static int init_nvnc(struct wayvnc* self, const char* addr, uint16_t port,

nvnc_set_name(self->nvnc, "WayVNC");

nvnc_set_desktop_layout_fn(self->nvnc, on_client_resize);
if (self->enable_resizing)
nvnc_set_desktop_layout_fn(self->nvnc, on_client_resize);

enum nvnc_auth_flags auth_flags = 0;
if (self->cfg.enable_auth) {
Expand Down Expand Up @@ -1884,6 +1886,8 @@ int main(int argc, char* argv[])
"Show performance counters." },
{ 'r', "render-cursor", NULL,
"Enable overlay cursor rendering." },
{ 'R', "disable-resizing", NULL,
"Disable automatic resizing." },
{ 's', "seat", "<name>",
"Select seat by name." },
{ 'S', "socket", "<path>",
Expand Down Expand Up @@ -1939,6 +1943,8 @@ int main(int argc, char* argv[])
use_transient_seat = !!option_parser_get_value(&option_parser,
"transient-seat");
start_detached = !!option_parser_get_value(&option_parser, "detached");
self.enable_resizing = !option_parser_get_value(&option_parser,
"disable-resizing");

self.start_detached = start_detached;
self.overlay_cursor = overlay_cursor;
Expand Down

0 comments on commit 64be1a5

Please sign in to comment.