Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
flags: '--no-default-features --features xdg-portal'
- name: Ubuntu XDG aarch64
os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
flags: '--no-default-features --features xdg-portal'
- name: Windows
os: windows-latest
target: x86_64-pc-windows-msvc
Expand All @@ -45,7 +49,7 @@ jobs:
if: matrix.name == 'Ubuntu GTK'
run: sudo apt update && sudo apt install libgtk-3-dev
- name: "[Ubuntu XDG] install dependencies"
if: matrix.name == 'Ubuntu XDG'
if: startsWith(matrix.name, 'Ubuntu XDG')
run: sudo apt update && sudo apt install libwayland-dev
- name: "[WASM] rustup"
if: matrix.name == 'WASM32'
Expand Down
22 changes: 13 additions & 9 deletions src/backend/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,19 @@ impl<'a> WasmDialog<'a> {

body.append_child(&overlay).ok();

input.add_event_listener_with_callback(
"change",
resolve_promise.as_ref().unchecked_ref(),
).unwrap();

input.add_event_listener_with_callback(
"cancel",
reject_promise.as_ref().unchecked_ref(),
).unwrap();
input
.add_event_listener_with_callback(
"change",
resolve_promise.as_ref().unchecked_ref(),
)
.unwrap();

input
.add_event_listener_with_callback(
"cancel",
reject_promise.as_ref().unchecked_ref(),
)
.unwrap();

if window.navigator().user_activation().is_active() {
// Browsers require transient user activation to open the file picker from JS.
Expand Down
6 changes: 3 additions & 3 deletions src/backend/xdg_desktop_portal/portal/libdbus.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
ffi::{CStr, CString, c_void},
ffi::{c_char, c_void, CStr, CString},
fmt,
marker::PhantomData,
ptr::NonNull,
Expand Down Expand Up @@ -295,8 +295,8 @@ impl<'a> MessageIter<'a> {

unsafe fn get_basic_str(&mut self) -> Option<CString> {
unsafe {
let mut out: *const i8 = std::ptr::null_mut();
self.get_basic(&mut out as *mut *const i8 as *mut _);
let mut out: *const c_char = std::ptr::null_mut();
self.get_basic(&mut out as *mut *const c_char as *mut _);

if out.is_null() {
None
Expand Down