Skip to content

Commit ac9b41d

Browse files
committed
Fix #112: Return work area instead of display area
1 parent 875a617 commit ac9b41d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

windows/window_manager.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,8 @@ flutter::EncodableMap WindowManager::GetPrimaryDisplay(
720720
info.cbSize = sizeof(MONITORINFO);
721721
::GetMonitorInfo(monitor, &info);
722722

723-
double width =
724-
(info.rcMonitor.right - info.rcMonitor.left) / devicePixelRatio;
725-
double height =
726-
(info.rcMonitor.bottom - info.rcMonitor.top) / devicePixelRatio;
723+
double width = (info.rcWork.right - info.rcWork.left) / devicePixelRatio;
724+
double height = (info.rcWork.bottom - info.rcWork.top) / devicePixelRatio;
727725

728726
flutter::EncodableMap size = flutter::EncodableMap();
729727
size[flutter::EncodableValue("width")] = flutter::EncodableValue(width);

0 commit comments

Comments
 (0)