Wayland: set the "application identifier" of non bordered, toplevel windows also (#1391).
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

This commit is contained in:
ManoloFLTK
2026-04-04 09:13:06 +02:00
parent ad537eddce
commit 12f90c87d6
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -243,8 +243,8 @@ void Fl_Window::default_xclass(const char *xc)
and the second one if the first is 'x'. Thus "foo" turns into "foo, Foo", and the second one if the first is 'x'. Thus "foo" turns into "foo, Foo",
and "xprog.1" turns into "xprog, XProg". and "xprog.1" turns into "xprog, XProg".
<I>Under Wayland</I>, this is used to set the "application identifier" of toplevel, <I>Under Wayland</I>, this is used to set the "application identifier" of toplevel
bordered windows. If not set, the executable name is used. windows. If not set, the executable name is used.
<I>Under Microsoft Windows</I>, this string is used as the name of the <I>Under Microsoft Windows</I>, this string is used as the name of the
WNDCLASS structure. The user should avoid names that may collide with WNDCLASS structure. The user should avoid names that may collide with
@@ -1562,6 +1562,8 @@ void Fl_Wayland_Window_Driver::makeWindow()
xdg_surface_add_listener(new_window->xdg_surface, &xdg_surface_listener, new_window); xdg_surface_add_listener(new_window->xdg_surface, &xdg_surface_listener, new_window);
new_window->xdg_toplevel = xdg_surface_get_toplevel(new_window->xdg_surface); new_window->xdg_toplevel = xdg_surface_get_toplevel(new_window->xdg_surface);
xdg_toplevel_add_listener(new_window->xdg_toplevel, &xdg_toplevel_listener, new_window); xdg_toplevel_add_listener(new_window->xdg_toplevel, &xdg_toplevel_listener, new_window);
xdg_toplevel_set_app_id(new_window->xdg_toplevel,
pWindow->xclass() ? pWindow->xclass() : get_prog_name());
if (pWindow->label()) xdg_toplevel_set_title(new_window->xdg_toplevel, pWindow->label()); if (pWindow->label()) xdg_toplevel_set_title(new_window->xdg_toplevel, pWindow->label());
wl_surface_commit(new_window->wl_surface); wl_surface_commit(new_window->wl_surface);
pWindow->border(0); pWindow->border(0);