flutter_desktop: remote rxbool of fullscreen

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-01 17:01:43 +08:00
parent 5df850e7de
commit b28fa19dfe
12 changed files with 128 additions and 141 deletions

View File

@@ -10,6 +10,7 @@ import '../../models/model.dart';
import '../../models/platform_model.dart';
import '../common.dart';
import '../consts.dart';
import './state_model.dart';
import 'dart:ui' as ui;
/// Mouse button enum.
@@ -321,9 +322,7 @@ class InputModel {
double x = evt['x'];
double y = max(0.0, evt['y']);
if (isDesktop) {
final RxBool fullscreen = Get.find(tag: 'fullscreen');
final tabBarHeight = fullscreen.isTrue ? 0 : kDesktopRemoteTabBarHeight;
y = y - tabBarHeight;
y = y - stateGlobal.tabBarHeight;
}
final canvasModel = parent.target!.canvasModel;
final ffiModel = parent.target!.ffiModel;