mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 11:35:56 +00:00
fix: macos tab drag (#8242)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -396,6 +396,16 @@ class DesktopTab extends StatelessWidget {
|
||||
}
|
||||
: null,
|
||||
onPanStart: (_) => startDragging(isMainWindow),
|
||||
onPanCancel: () {
|
||||
if (isMacOS) {
|
||||
setMovable(isMainWindow, false);
|
||||
}
|
||||
},
|
||||
onPanEnd: (_) {
|
||||
if (isMacOS) {
|
||||
setMovable(isMainWindow, false);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Offstage(
|
||||
@@ -786,6 +796,14 @@ void startDragging(bool isMainWindow) {
|
||||
}
|
||||
}
|
||||
|
||||
void setMovable(bool isMainWindow, bool movable) {
|
||||
if (isMainWindow) {
|
||||
windowManager.setMovable(movable);
|
||||
} else {
|
||||
WindowController.fromWindowId(kWindowId!).setMovable(movable);
|
||||
}
|
||||
}
|
||||
|
||||
/// return true -> window will be maximize
|
||||
/// return false -> window will be unmaximize
|
||||
Future<bool> toggleMaximize(bool isMainWindow) async {
|
||||
|
||||
Reference in New Issue
Block a user