remember remote window fullscreen, set global state
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
55fc0cb63b
commit
17af5622ec
@ -410,6 +410,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
void onRemoveId(String id) async {
|
||||
if (tabController.state.value.tabs.isEmpty) {
|
||||
await WindowController.fromWindowId(windowId()).close();
|
||||
stateGlobal.setFullscreen(false, procWnd: false);
|
||||
}
|
||||
ConnectionTypeState.delete(id);
|
||||
_update_remote_count();
|
||||
|
@ -64,7 +64,7 @@ class StateGlobal {
|
||||
|
||||
setMinimized(bool v) => _isMinimized = v;
|
||||
|
||||
setFullscreen(bool v) {
|
||||
setFullscreen(bool v, {bool procWnd = true}) {
|
||||
if (_fullscreen != v) {
|
||||
_fullscreen = v;
|
||||
_showTabBar.value = !_fullscreen;
|
||||
@ -76,6 +76,7 @@ class StateGlobal {
|
||||
print(
|
||||
"fullscreen: $fullscreen, resizeEdgeSize: ${_resizeEdgeSize.value}");
|
||||
_windowBorderWidth.value = fullscreen ? 0 : kWindowBorderWidth;
|
||||
if (procWnd) {
|
||||
WindowController.fromWindowId(windowId)
|
||||
.setFullscreen(_fullscreen)
|
||||
.then((_) {
|
||||
@ -92,6 +93,7 @@ class StateGlobal {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StateGlobal._();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user