Skip to content

Commit

Permalink
desktop: Associate Ruffle window with Ruffle
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kjarosh committed Jan 22, 2025
1 parent 85d92d3 commit 7008e15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion desktop/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,18 @@ impl ApplicationHandler<RuffleEvent> for App {
let preferred_height = self.preferences.cli.height;
let start_fullscreen = self.preferences.cli.fullscreen;

let window_attributes = WindowAttributes::default()
let mut window_attributes = WindowAttributes::default()
.with_visible(false)
.with_title("Ruffle")
.with_window_icon(Some(icon))
.with_min_inner_size(min_window_size);

#[cfg(target_os = "linux")]
{
use winit::platform::wayland::WindowAttributesExtWayland;
window_attributes = window_attributes.with_name("rs.ruffle.Ruffle", "main");
}

let event_loop_proxy = self.event_loop_proxy.clone();
let preferences = self.preferences.clone();
let window = event_loop
Expand Down

0 comments on commit 7008e15

Please sign in to comment.