From 689cb70da29984ba8c015fc0bd9d70fae004976f Mon Sep 17 00:00:00 2001 From: Norbert Federa Date: Fri, 16 Apr 2021 10:07:43 +0200 Subject: [PATCH] client/x11: fix parent window size restrictions If a parent window id is specified, the "workarea limits" of the display must not apply. --- client/X11/xf_monitor.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index 72a3dbecd..a545892f0 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -158,6 +158,15 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight) *pMaxWidth = settings->DesktopWidth; *pMaxHeight = settings->DesktopHeight; + if (settings->ParentWindowId) + { + xfc->workArea.x = 0; + xfc->workArea.y = 0; + xfc->workArea.width = settings->DesktopWidth; + xfc->workArea.height = settings->DesktopHeight; + return TRUE; + } + /* get mouse location */ if (!XQueryPointer(xfc->display, DefaultRootWindow(xfc->display), &_dummy_w, &_dummy_w, &mouse_x, &mouse_y, &_dummy_i, &_dummy_i, (void*)&_dummy_i))