refact: Wayland, do not show multi displays (#8277)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-06-07 09:54:50 +08:00 committed by GitHub
parent 686dd11d8e
commit 6d1d844b14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -583,10 +583,11 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
child: Text(translate('Lock after session end'))));
}
if (bind.mainGetUseTextureRender() &&
if (!pi.isWayland &&
pi.isSupportMultiDisplay &&
PrivacyModeState.find(id).isEmpty &&
pi.displaysCount.value > 1 &&
bind.mainGetUseTextureRender() &&
bind.mainGetUserDefaultOption(key: kKeyShowMonitorsToolbar) == 'Y') {
final value =
bind.sessionGetDisplaysAsIndividualWindows(sessionId: ffi.sessionId) ==

View File

@ -467,7 +467,8 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
toolbarItems.add(Obx(() {
if (PrivacyModeState.find(widget.id).isEmpty &&
pi.displaysCount.value > 1) {
pi.displaysCount.value > 1 &&
!pi.isWayland) {
return _MonitorMenu(
id: widget.id,
ffi: widget.ffi,