Skip to content

Commit 46aa652

Browse files
committed
desktop: Associate Ruffle window with Ruffle
This patch associates the main window created by Ruffle with the Ruffle application by its ID. This fixes issues on some desktops (KDE, Wayland) where the window is not being recognized as Ruffle.
1 parent 85d92d3 commit 46aa652

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

desktop/src/app.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,18 @@ impl ApplicationHandler<RuffleEvent> for App {
439439
let preferred_height = self.preferences.cli.height;
440440
let start_fullscreen = self.preferences.cli.fullscreen;
441441

442-
let window_attributes = WindowAttributes::default()
442+
let mut window_attributes = WindowAttributes::default()
443443
.with_visible(false)
444444
.with_title("Ruffle")
445445
.with_window_icon(Some(icon))
446446
.with_min_inner_size(min_window_size);
447447

448+
#[cfg(target_os = "linux")]
449+
{
450+
use winit::platform::wayland::WindowAttributesExtWayland;
451+
window_attributes = window_attributes.with_name("rs.ruffle.Ruffle", "main");
452+
}
453+
448454
let event_loop_proxy = self.event_loop_proxy.clone();
449455
let preferences = self.preferences.clone();
450456
let window = event_loop

0 commit comments

Comments
 (0)