mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-19 14:28:15 +02:00
window: Set window title and class
This commit is contained in:
parent
e7afd919c9
commit
3e0fe5c0df
1 changed files with 5 additions and 0 deletions
|
|
@ -2168,6 +2168,8 @@ window_set_title(struct window *window, const char *title)
|
|||
{
|
||||
free(window->title);
|
||||
window->title = strdup(title);
|
||||
if (window->shell_surface)
|
||||
wl_shell_surface_set_title(window->shell_surface, title);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
@ -2218,6 +2220,9 @@ window_create_internal(struct display *display, struct window *parent)
|
|||
window->shell_surface =
|
||||
wl_shell_get_shell_surface(display->shell,
|
||||
window->surface);
|
||||
if (window->title)
|
||||
wl_shell_surface_set_title(window->shell_surface,
|
||||
window->title);
|
||||
}
|
||||
window->allocation.x = 0;
|
||||
window->allocation.y = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue