Backport upstream MR !168 to fix portal requests
Shell rejects portal requests that come in before the window is mapped.
This commit is contained in:
parent
a48b01361d
commit
89eda8854d
41
168.patch
Normal file
41
168.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 58f4e29679e25a031133bfc145ae7a3f034efd9c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Maximiliano Sandoval R <msandova@gnome.org>
|
||||||
|
Date: Thu, 5 Oct 2023 22:01:36 +0200
|
||||||
|
Subject: [PATCH] window: Ask portal only once the window is mapped
|
||||||
|
|
||||||
|
Otherwise the shell will reject the permission.
|
||||||
|
---
|
||||||
|
src/widgets/window.rs | 11 ++++++++---
|
||||||
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/widgets/window.rs b/src/widgets/window.rs
|
||||||
|
index 8ec35fc3..397da532 100644
|
||||||
|
--- a/src/widgets/window.rs
|
||||||
|
+++ b/src/widgets/window.rs
|
||||||
|
@@ -165,15 +165,20 @@ mod imp {
|
||||||
|
let enabled = navigation_view.visible_page().is_some_and(|page| &page == &*imp.camera_page);
|
||||||
|
obj.set_shutter_enabled(enabled);
|
||||||
|
}));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
+ impl WidgetImpl for Window {
|
||||||
|
+ fn map(&self) {
|
||||||
|
+ self.parent_map();
|
||||||
|
+ let camera = self.camera.get();
|
||||||
|
let ctx = glib::MainContext::default();
|
||||||
|
- ctx.spawn_local(glib::clone!(@weak obj => async move {
|
||||||
|
- obj.imp().camera.start().await;
|
||||||
|
+ ctx.spawn_local(glib::clone!(@weak camera => async move {
|
||||||
|
+ camera.start().await;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- impl WidgetImpl for Window {}
|
||||||
|
impl WindowImpl for Window {
|
||||||
|
// Save window state on delete event
|
||||||
|
fn close_request(&self) -> glib::Propagation {
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -34,6 +34,9 @@ Source: https://download.gnome.org/sources/snapshot/45/snapshot-%{tarbal
|
|||||||
# Downstream patch to disable linting as part of self tests
|
# Downstream patch to disable linting as part of self tests
|
||||||
Patch: 0001-Disable-cargo-clippy-test.patch
|
Patch: 0001-Disable-cargo-clippy-test.patch
|
||||||
|
|
||||||
|
# https://gitlab.gnome.org/GNOME/snapshot/-/merge_requests/168
|
||||||
|
Patch: 168.patch
|
||||||
|
|
||||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||||
ExcludeArch: %{ix86}
|
ExcludeArch: %{ix86}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user