From 0cc5cf940b8f4759281ccceafda4896100734ecb Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 19 Nov 2013 16:04:14 -0500 Subject: [PATCH] wayland-surface: Remove some properties from the double-buffered state Now that we can always set them on the MetaWindow... --- src/wayland/meta-wayland-surface.c | 46 ++++++------------------------ src/wayland/meta-wayland-surface.h | 12 -------- 2 files changed, 9 insertions(+), 49 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index af951795b..83560511e 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -322,27 +322,6 @@ meta_wayland_surface_commit (struct wl_client *client, meta_window_set_opaque_region (surface->window, surface->pending.opaque_region); meta_window_set_input_region (surface->window, surface->pending.input_region); surface_process_damage (surface, surface->pending.damage); - - meta_window_set_title (surface->window, surface->pending.title); - g_clear_pointer (&surface->pending.title, g_free); - - meta_window_set_wm_class (surface->window, surface->pending.app_id, surface->pending.app_id); - g_clear_pointer (&surface->pending.app_id, g_free); - - meta_window_set_gtk_dbus_properties (surface->window, - surface->pending.gtk_application_id, - surface->pending.gtk_unique_bus_name, - surface->pending.gtk_app_menu_path, - surface->pending.gtk_menubar_path, - surface->pending.gtk_application_object_path, - surface->pending.gtk_window_object_path); - - g_clear_pointer (&surface->pending.gtk_application_id, g_free); - g_clear_pointer (&surface->pending.gtk_unique_bus_name, g_free); - g_clear_pointer (&surface->pending.gtk_app_menu_path, g_free); - g_clear_pointer (&surface->pending.gtk_menubar_path, g_free); - g_clear_pointer (&surface->pending.gtk_application_object_path, g_free); - g_clear_pointer (&surface->pending.gtk_window_object_path, g_free); } if (surface->pending.buffer) @@ -570,8 +549,7 @@ xdg_surface_set_title (struct wl_client *client, MetaWaylandSurfaceExtension *xdg_surface = wl_resource_get_user_data (resource); MetaWaylandSurface *surface = wl_container_of (xdg_surface, surface, xdg_surface); - g_clear_pointer (&surface->pending.title, g_free); - surface->pending.title = g_strdup (title); + meta_window_set_title (surface->window, title); } static void @@ -582,8 +560,7 @@ xdg_surface_set_app_id (struct wl_client *client, MetaWaylandSurfaceExtension *xdg_surface = wl_resource_get_user_data (resource); MetaWaylandSurface *surface = wl_container_of (xdg_surface, surface, xdg_surface); - g_clear_pointer (&surface->pending.app_id, g_free); - surface->pending.app_id = g_strdup (app_id); + meta_window_set_wm_class (surface->window, app_id, app_id); } static void @@ -829,18 +806,13 @@ set_dbus_properties (struct wl_client *client, MetaWaylandSurfaceExtension *gtk_surface = wl_resource_get_user_data (resource); MetaWaylandSurface *surface = wl_container_of (gtk_surface, surface, gtk_surface); - g_clear_pointer (&surface->pending.gtk_application_id, g_free); - surface->pending.gtk_application_id = g_strdup (application_id); - g_clear_pointer (&surface->pending.gtk_unique_bus_name, g_free); - surface->pending.gtk_unique_bus_name = g_strdup (unique_bus_name); - g_clear_pointer (&surface->pending.gtk_app_menu_path, g_free); - surface->pending.gtk_app_menu_path = g_strdup (app_menu_path); - g_clear_pointer (&surface->pending.gtk_menubar_path, g_free); - surface->pending.gtk_menubar_path = g_strdup (menubar_path); - g_clear_pointer (&surface->pending.gtk_application_object_path, g_free); - surface->pending.gtk_application_object_path = g_strdup (application_object_path); - g_clear_pointer (&surface->pending.gtk_window_object_path, g_free); - surface->pending.gtk_window_object_path = g_strdup (window_object_path); + meta_window_set_gtk_dbus_properties (surface->window, + application_id, + unique_bus_name, + app_menu_path, + menubar_path, + application_object_path, + window_object_path); } static const struct gtk_surface_interface meta_wayland_gtk_surface_interface = { diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h index e29aa0cb8..62d2fdeb3 100644 --- a/src/wayland/meta-wayland-surface.h +++ b/src/wayland/meta-wayland-surface.h @@ -64,18 +64,6 @@ typedef struct /* wl_surface.frame */ struct wl_list frame_callback_list; - - /* xdg_surface */ - char *title; - char *app_id; - - /* gtk_surface */ - char *gtk_application_id; - char *gtk_unique_bus_name; - char *gtk_app_menu_path; - char *gtk_menubar_path; - char *gtk_application_object_path; - char *gtk_window_object_path; } MetaWaylandDoubleBufferedState; typedef struct