From ae2e6d0a7b7274b7c75fca9aa32862b1a2645245 Mon Sep 17 00:00:00 2001 From: bbb651 Date: Sun, 9 Mar 2025 00:07:43 +0200 Subject: [PATCH] wayland: Activate window with `XDG_ACTIVATION_TOKEN`. --- profiler/src/BackendWayland.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/profiler/src/BackendWayland.cpp b/profiler/src/BackendWayland.cpp index 3e3aa285..2d732355 100644 --- a/profiler/src/BackendWayland.cpp +++ b/profiler/src/BackendWayland.cpp @@ -1014,6 +1014,16 @@ Backend::Backend( const char* title, const std::function& redraw, const xdg_toplevel_set_title( s_toplevel, title ); xdg_toplevel_set_app_id( s_toplevel, "tracy" ); + if( s_activation ) + { + const char* token = getenv( "XDG_ACTIVATION_TOKEN" ); + if( token ) + { + xdg_activation_v1_activate( s_activation, token, s_surf ); + unsetenv( "XDG_ACTIVATION_TOKEN" ); + } + } + if( s_decoration ) { s_tldec = zxdg_decoration_manager_v1_get_toplevel_decoration( s_decoration, s_toplevel );