mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 14:31:40 +08:00
Implement Fl_Window::xclass(const char*) for the Wayland platform (#1391).
This commit is contained in:
+5
-2
@@ -241,9 +241,12 @@ void Fl_Window::default_xclass(const char *xc)
|
||||
and the second one if the first is 'x'. Thus "foo" turns into "foo, Foo",
|
||||
and "xprog.1" turns into "xprog, XProg".
|
||||
|
||||
<I>Under Wayland</I>, this is used to set the "application identifier" of toplevel,
|
||||
bordered windows. If not set, the executable name is used.
|
||||
|
||||
<I>Under Microsoft Windows</I>, this string is used as the name of the
|
||||
WNDCLASS structure, though it is not clear if this can have any
|
||||
visible effect.
|
||||
WNDCLASS structure. The user should avoid names that may collide with
|
||||
system-reserved window class names (e.g., anything beginning with "edit").
|
||||
|
||||
\since FLTK 1.3 the passed string is copied. You can use a local
|
||||
variable or free the string immediately after this call. Note that
|
||||
|
||||
@@ -1458,7 +1458,8 @@ void Fl_Wayland_Window_Driver::makeWindow()
|
||||
new_window->frame = libdecor_decorate(scr_driver->libdecor_context, new_window->wl_surface,
|
||||
&libdecor_frame_iface, new_window);
|
||||
// appears in the Gnome desktop menu bar
|
||||
libdecor_frame_set_app_id(new_window->frame, get_prog_name());
|
||||
const char *appid = pWindow->xclass() ? pWindow->xclass() : get_prog_name();
|
||||
libdecor_frame_set_app_id(new_window->frame, appid);
|
||||
libdecor_frame_set_title(new_window->frame, pWindow->label()?pWindow->label():"");
|
||||
if (!is_resizable()) {
|
||||
libdecor_frame_unset_capabilities(new_window->frame, LIBDECOR_ACTION_RESIZE);
|
||||
|
||||
Reference in New Issue
Block a user