[mutter] surface: Merge version logic inline
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] surface: Merge version logic inline
- Date: Tue, 22 Apr 2014 22:28:21 +0000 (UTC)
commit 777a6d457011e9ecd5820bb07b8033f9a43bb7a5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 22 18:18:12 2014 -0400
surface: Merge version logic inline
src/wayland/meta-wayland-surface.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 0742736..f64f4fa 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -594,13 +594,6 @@ destroy_surface_extension (MetaWaylandSurfaceExtension *extension)
extension->resource = NULL;
}
-static int
-get_resource_version (struct wl_resource *master_resource,
- int max_version)
-{
- return MIN (max_version, wl_resource_get_version (master_resource));
-}
-
static gboolean
create_surface_extension (MetaWaylandSurfaceExtension *extension,
int max_version,
@@ -617,7 +610,8 @@ create_surface_extension (MetaWaylandSurfaceExtension *extension,
return FALSE;
client = wl_resource_get_client (surface->resource);
- extension->resource = wl_resource_create (client, interface, get_resource_version (master_resource,
max_version), id);
+ extension->resource = wl_resource_create (client, interface,
+ MIN (max_version, wl_resource_get_version (master_resource)),
id);
wl_resource_set_implementation (extension->resource, implementation, surface, destructor);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]