Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix: build (#12968)

fufesoub11a8dfe54d5
diff --git a/flutter/windows/runner/win32_desktop.cpp b/flutter/windows/runner/win32_desktop.cpp
index 566f883ec..70ba31c75 100644
--- a/flutter/windows/runner/win32_desktop.cpp
+++ b/flutter/windows/runner/win32_desktop.cpp
@@ -21,7 +21,10 @@ namespace Win32Desktop
hMonitor = MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY);
RECT workAreaRect;
- bool haveWorkAreaRect = false;
+ workAreaRect.left = 0;
+ workAreaRect.top = 0;
+ workAreaRect.right = 1280;
+ workAreaRect.bottom = 1024 - 40; // default Windows 10 task bar height
if (hMonitor != NULL)
{
@@ -32,20 +35,9 @@ namespace Win32Desktop
if (GetMonitorInfoW(hMonitor, &monitorInfo))
{
workAreaRect = monitorInfo.rcWork;
- haveWorkAreaRect = true;
}
}
- if (!haveWorkAreaRect)
- {
- // I don't think this is possible, but just in case, some
- // reasonably sane fallbacks.
- workAreaRect.left = 0;
- workAreaRect.top = 0;
- workAreaRect.right = 1280;
- workAreaRect.bottom = 1024 - 40; // default Windows 10 task bar height
- }
-
origin.x = workAreaRect.left;
origin.y = workAreaRect.top;
diff --git a/flutter/windows/runner/win32_desktop.h b/flutter/windows/runner/win32_desktop.h
index 3ed757fe0..164770b47 100644
--- a/flutter/windows/runner/win32_desktop.h
+++ b/flutter/windows/runner/win32_desktop.h
@@ -9,4 +9,4 @@ namespace Win32Desktop
void FitToWorkArea(Win32Window::Point& origin, Win32Window::Size& size);
}
-#endif // RUNNER_WIN32_DESKTOP_H_
\ No newline at end of file
+#endif // RUNNER_WIN32_DESKTOP_H_