File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -720,15 +720,31 @@ flutter::EncodableMap WindowManager::GetPrimaryDisplay(
720720 info.cbSize = sizeof (MONITORINFO);
721721 ::GetMonitorInfo (monitor, &info);
722722
723- double width = (info.rcWork .right - info.rcWork .left ) / devicePixelRatio;
724- double height = (info.rcWork .bottom - info.rcWork .top ) / devicePixelRatio;
723+ double width =
724+ (info.rcMonitor .right - info.rcMonitor .left ) / devicePixelRatio;
725+ double height =
726+ (info.rcMonitor .bottom - info.rcMonitor .top ) / devicePixelRatio;
727+
728+ double visibleWidth =
729+ (info.rcWork .right - info.rcWork .left ) / devicePixelRatio;
730+ double visibleHeight =
731+ (info.rcWork .bottom - info.rcWork .top ) / devicePixelRatio;
725732
726733 flutter::EncodableMap size = flutter::EncodableMap ();
734+ flutter::EncodableMap visibleSize = flutter::EncodableMap ();
735+
727736 size[flutter::EncodableValue (" width" )] = flutter::EncodableValue (width);
728737 size[flutter::EncodableValue (" height" )] = flutter::EncodableValue (height);
729738
739+ visibleSize[flutter::EncodableValue (" width" )] =
740+ flutter::EncodableValue (visibleWidth);
741+ visibleSize[flutter::EncodableValue (" height" )] =
742+ flutter::EncodableValue (visibleHeight);
743+
730744 flutter::EncodableMap display = flutter::EncodableMap ();
731745 display[flutter::EncodableValue (" size" )] = flutter::EncodableValue (size);
746+ display[flutter::EncodableValue (" visibleSize" )] =
747+ flutter::EncodableValue (visibleSize);
732748
733749 return display;
734750}
You can’t perform that action at this time.
0 commit comments