diff --git a/client/src/config.c b/client/src/config.c index 0e617e32..ad81a458 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -220,6 +220,14 @@ static struct Option options[] = .type = OPTION_TYPE_BOOL, .value.x_bool = false, }, + { + .module = "win", + .name = "setGuestRes", + .description = "On window size change, request the guest to match" + " resoution (if supported by the guest, currently LG IDD only)", + .type = OPTION_TYPE_BOOL, + .value.x_bool = true, + }, { .module = "win", .name = "fpsMin", @@ -717,6 +725,7 @@ bool config_load(int argc, char * argv[]) g_params.helpMenuDelayUs = option_get_int("input", "helpMenuDelay") * (uint64_t) 1000; g_params.minimizeOnFocusLoss = option_get_bool("win", "minimizeOnFocusLoss"); + g_params.setGuestRes = option_get_bool("win", "setGuestRes" ); if ((g_params.useSpice = option_get_bool("spice", "enable"))) { diff --git a/client/src/core.c b/client/src/core.c index a6091b5e..6fdf618b 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -192,7 +192,7 @@ bool core_warpPointer(int x, int y, bool exiting) void core_onWindowSizeChanged(unsigned width, unsigned height) { - if (!g_state.pointerQueue) + if (!g_params.setGuestRes || !g_state.pointerQueue) return; if (g_state.srcSize.x == width && g_state.srcSize.y == height) diff --git a/client/src/main.h b/client/src/main.h index e2f7ed14..ab0bae08 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -172,6 +172,7 @@ struct AppParams bool center; int x, y; unsigned int w, h; + bool setGuestRes; int fpsMin; LG_RendererRotate winRotate; bool useSpice;