mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 20:59:37 +08:00
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
99bf4e939c
commit
0765f7057f
@ -379,9 +379,15 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
mod_menu.PopupMenuItem<String>(
|
||||
height: _MenubarTheme.height,
|
||||
padding: EdgeInsets.zero,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: rowChildren),
|
||||
child: Listener(
|
||||
onPointerHover: (PointerHoverEvent e) =>
|
||||
widget.ffi.inputModel.lastMousePos = e.position,
|
||||
child: MouseRegion(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: rowChildren),
|
||||
),
|
||||
),
|
||||
)
|
||||
];
|
||||
},
|
||||
|
@ -408,6 +408,13 @@ class InputModel {
|
||||
}
|
||||
}
|
||||
|
||||
void refreshMousePos() => handleMouse({
|
||||
'x': lastMousePos.dx,
|
||||
'y': lastMousePos.dy,
|
||||
'buttons': 0,
|
||||
'type': _kMouseEventMove,
|
||||
});
|
||||
|
||||
void handleMouse(Map<String, dynamic> evt) {
|
||||
double x = evt['x'];
|
||||
double y = max(0.0, evt['y']);
|
||||
|
@ -244,6 +244,7 @@ class FfiModel with ChangeNotifier {
|
||||
parent.target?.canvasModel.updateViewStyle();
|
||||
}
|
||||
parent.target?.recordingModel.onSwitchDisplay();
|
||||
parent.target?.inputModel.refreshMousePos();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user