diff options
author | Scott Moreau <oreaus@gmail.com> | 2013-03-16 17:57:17 -0600 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2013-03-18 12:01:55 +0000 |
commit | 89b1947631f5721c88abd8d44023072efaca384b (patch) | |
tree | 8abb0fc54151a1ae00392512bccc9df21aa098ac | |
parent | 5149ea7c66c359d8445b7537f76036dd760780b3 (diff) | |
download | gtk+-89b1947631f5721c88abd8d44023072efaca384b.tar.gz |
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>
-rw-r--r-- | gdk/wayland/gdkwindow-wayland.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 6f7e744a79..a0ae294fb3 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -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 |