mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 03:28:03 +00:00
flutter_desktop: fix layout size computation
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -577,8 +577,10 @@ class CanvasModel with ChangeNotifier {
|
||||
|
||||
Size get size {
|
||||
final size = MediaQueryData.fromWindow(ui.window).size;
|
||||
return Size(size.width - windowBorderWidth * 2,
|
||||
size.height - tabBarHeight - windowBorderWidth * 2);
|
||||
// If minimized, w or h may be negative here.
|
||||
double w = size.width - windowBorderWidth * 2;
|
||||
double h = size.height - tabBarHeight - windowBorderWidth * 2;
|
||||
return Size(w < 0 ? 0 : w, h < 0 ? 0 : h);
|
||||
}
|
||||
|
||||
moveDesktopMouse(double x, double y) {
|
||||
|
||||
Reference in New Issue
Block a user