refact: Wayland, not support multiple displays (#8280)
* refact: Wayland, not support multiple displays Signed-off-by: fufesou <shuanglongchen@yeah.net> * refact: Wayland disable multiple for RemoteDesktop Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net> Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
64d0fb17f7
commit
8fa611daed
@ -583,8 +583,7 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
|
|||||||
child: Text(translate('Lock after session end'))));
|
child: Text(translate('Lock after session end'))));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pi.isWayland &&
|
if (pi.isSupportMultiDisplay &&
|
||||||
pi.isSupportMultiDisplay &&
|
|
||||||
PrivacyModeState.find(id).isEmpty &&
|
PrivacyModeState.find(id).isEmpty &&
|
||||||
pi.displaysCount.value > 1 &&
|
pi.displaysCount.value > 1 &&
|
||||||
bind.mainGetUseTextureRender() &&
|
bind.mainGetUseTextureRender() &&
|
||||||
|
@ -467,8 +467,7 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
|
|||||||
|
|
||||||
toolbarItems.add(Obx(() {
|
toolbarItems.add(Obx(() {
|
||||||
if (PrivacyModeState.find(widget.id).isEmpty &&
|
if (PrivacyModeState.find(widget.id).isEmpty &&
|
||||||
pi.displaysCount.value > 1 &&
|
pi.displaysCount.value > 1) {
|
||||||
!pi.isWayland) {
|
|
||||||
return _MonitorMenu(
|
return _MonitorMenu(
|
||||||
id: widget.id,
|
id: widget.id,
|
||||||
ffi: widget.ffi,
|
ffi: widget.ffi,
|
||||||
@ -2466,7 +2465,8 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
if (!isMacOS) Obx(() => Offstage(
|
if (!isMacOS)
|
||||||
|
Obx(() => Offstage(
|
||||||
offstage: isFullscreen.isFalse,
|
offstage: isFullscreen.isFalse,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => widget.setMinimize(),
|
onPressed: () => widget.setMinimize(),
|
||||||
|
@ -645,8 +645,8 @@ fn on_create_session_response(
|
|||||||
"handle_token".to_string(),
|
"handle_token".to_string(),
|
||||||
Variant(Box::new("u3".to_string())),
|
Variant(Box::new("u3".to_string())),
|
||||||
);
|
);
|
||||||
// https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-method-org-freedesktop-portal-ScreenCast.SelectSources
|
// https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.ScreenCast.html
|
||||||
args.insert("multiple".into(), Variant(Box::new(true)));
|
// args.insert("multiple".into(), Variant(Box::new(true)));
|
||||||
args.insert("types".into(), Variant(Box::new(1u32))); //| 2u32)));
|
args.insert("types".into(), Variant(Box::new(1u32))); //| 2u32)));
|
||||||
|
|
||||||
let path = portal.select_sources(ses.clone(), args)?;
|
let path = portal.select_sources(ses.clone(), args)?;
|
||||||
@ -663,6 +663,9 @@ fn on_create_session_response(
|
|||||||
failure.clone(),
|
failure.clone(),
|
||||||
)?;
|
)?;
|
||||||
} else {
|
} else {
|
||||||
|
// TODO: support persist_mode for remote_desktop_portal
|
||||||
|
// https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.RemoteDesktop.html
|
||||||
|
|
||||||
args.insert(
|
args.insert(
|
||||||
"handle_token".to_string(),
|
"handle_token".to_string(),
|
||||||
Variant(Box::new("u2".to_string())),
|
Variant(Box::new("u2".to_string())),
|
||||||
@ -706,8 +709,8 @@ fn on_select_devices_response(
|
|||||||
"handle_token".to_string(),
|
"handle_token".to_string(),
|
||||||
Variant(Box::new("u3".to_string())),
|
Variant(Box::new("u3".to_string())),
|
||||||
);
|
);
|
||||||
// https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-method-org-freedesktop-portal-ScreenCast.SelectSources
|
// https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.ScreenCast.html
|
||||||
args.insert("multiple".into(), Variant(Box::new(true)));
|
// args.insert("multiple".into(), Variant(Box::new(true)));
|
||||||
args.insert("types".into(), Variant(Box::new(1u32))); //| 2u32)));
|
args.insert("types".into(), Variant(Box::new(1u32))); //| 2u32)));
|
||||||
|
|
||||||
let session = session.clone();
|
let session = session.clone();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user