mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-18 13:37:52 +08:00
Merge pull request #5413 from dignow/fix/move_tab_to_new_window_unregister_texture
Do not unregister texture if move to new window
This commit is contained in:
commit
1ef2ca83a9
@ -204,7 +204,7 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
// https://github.com/flutter/flutter/issues/64935
|
// https://github.com/flutter/flutter/issues/64935
|
||||||
super.dispose();
|
super.dispose();
|
||||||
debugPrint("REMOTE PAGE dispose session $sessionId ${widget.id}");
|
debugPrint("REMOTE PAGE dispose session $sessionId ${widget.id}");
|
||||||
await _renderTexture.destroy();
|
await _renderTexture.destroy(closeSession);
|
||||||
// ensure we leave this session, this is a double check
|
// ensure we leave this session, this is a double check
|
||||||
bind.sessionEnterOrLeave(sessionId: sessionId, enter: false);
|
bind.sessionEnterOrLeave(sessionId: sessionId, enter: false);
|
||||||
DesktopMultiWindow.removeListener(this);
|
DesktopMultiWindow.removeListener(this);
|
||||||
|
@ -31,9 +31,11 @@ class RenderTexture {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() async {
|
destroy(bool unregisterTexture) async {
|
||||||
if (useTextureRender && _textureKey != -1 && _sessionId != null) {
|
if (useTextureRender && _textureKey != -1 && _sessionId != null) {
|
||||||
platformFFI.registerTexture(_sessionId!, 0);
|
if (unregisterTexture) {
|
||||||
|
platformFFI.registerTexture(_sessionId!, 0);
|
||||||
|
}
|
||||||
await textureRenderer.closeTexture(_textureKey);
|
await textureRenderer.closeTexture(_textureKey);
|
||||||
_textureKey = -1;
|
_textureKey = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user