forked from AuroraMiddleware/gtk
wayland: Set title on shell surfaces to window title
We currently use this information to display the title string in the window list of the desktop shell. Signed-off-by: Rob Bradford <rob@linux.intel.com>
This commit is contained in:
parent
5149ea7c66
commit
89b1947631
@ -115,6 +115,8 @@ struct _GdkWindowImplWayland
|
||||
*/
|
||||
cairo_surface_t *server_surface;
|
||||
|
||||
gchar *title;
|
||||
|
||||
uint32_t resize_edges;
|
||||
|
||||
int focus_count;
|
||||
@ -282,6 +284,8 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display,
|
||||
|
||||
g_object_ref (window);
|
||||
|
||||
impl->title = NULL;
|
||||
|
||||
switch (GDK_WINDOW_TYPE (window))
|
||||
{
|
||||
case GDK_WINDOW_TOPLEVEL:
|
||||
@ -727,6 +731,9 @@ gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
|
||||
|
||||
if (impl->cairo_surface)
|
||||
gdk_wayland_window_attach_image (window);
|
||||
|
||||
if (impl->shell_surface && impl->title)
|
||||
wl_shell_surface_set_title (impl->shell_surface, impl->title);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1158,10 +1165,15 @@ static void
|
||||
gdk_wayland_window_set_title (GdkWindow *window,
|
||||
const gchar *title)
|
||||
{
|
||||
GdkWindowImplWayland *impl;
|
||||
g_return_if_fail (title != NULL);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
|
||||
impl->title = strdup (title);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user