Fixed Added fullscreen handling for dynamic resolution.
@@ -47,11 +47,14 @@ struct _xfDispContext
int targetWidth, targetHeight;
BOOL activated;
BOOL waitingResize;
+ BOOL fullscreen;
UINT16 lastSentDesktopOrientation;
UINT32 lastSentDesktopScaleFactor;
UINT32 lastSentDeviceScaleFactor;
};
+static UINT xf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, int nmonitors);
+
static BOOL xf_disp_settings_changed(xfDispContext* xfDisp)
{
rdpSettings* settings;
@@ -72,6 +75,9 @@ static BOOL xf_disp_settings_changed(xfDispContext* xfDisp)
if (xfDisp->lastSentDeviceScaleFactor != settings->DeviceScaleFactor)
return TRUE;
+ if (xfDisp->fullscreen != xfDisp->xfc->fullscreen)
+ return TRUE;
+
return FALSE;
}
@@ -83,6 +89,7 @@ static BOOL xf_update_last_sent(xfDispContext* xfDisp)
xfDisp->lastSentDesktopOrientation = settings->DesktopOrientation;
xfDisp->lastSentDesktopScaleFactor = settings->DesktopScaleFactor;
xfDisp->lastSentDeviceScaleFactor = settings->DeviceScaleFactor;
+ xfDisp->fullscreen = xfDisp->xfc->fullscreen;
return TRUE;
}
@@ -103,6 +110,14 @@ static BOOL xf_disp_sendResize(xfDispContext* xfDisp)
if (!xf_disp_settings_changed(xfDisp))
return TRUE;
+ if (xfc->fullscreen)
+ {
+ if (xf_disp_sendLayout(xfc->disp, settings->MonitorDefArray,
+ settings->MonitorCount) != CHANNEL_RC_OK)
+ return FALSE;
+ }
+ else
+ {
xfDisp->waitingResize = TRUE;
layout.Flags = DISPLAY_CONTROL_MONITOR_PRIMARY;
layout.Top = layout.Left = 0;
@@ -116,6 +131,7 @@ static BOOL xf_disp_sendResize(xfDispContext* xfDisp)
if (xfc->disp->SendMonitorLayout(xfc->disp, 1, &layout) != CHANNEL_RC_OK)
return FALSE;
+ }
return xf_update_last_sent(xfDisp);
}
