mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-14 08:56:26 -05:00
surface: make wlr_surface_create private
This is not meant to be exposed in the public API, just like wlr_region_create [1]. [1]: https://github.com/swaywm/wlroots/pull/2662
This commit is contained in:
parent
e76583f1ad
commit
c430cd7d53
4 changed files with 19 additions and 12 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "types/wlr_region.h"
|
||||
#include "types/wlr_surface.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
#define COMPOSITOR_VERSION 4
|
||||
|
|
@ -119,7 +120,7 @@ static void compositor_create_surface(struct wl_client *client,
|
|||
struct wl_resource *resource, uint32_t id) {
|
||||
struct wlr_compositor *compositor = compositor_from_resource(resource);
|
||||
|
||||
struct wlr_surface *surface = wlr_surface_create(client,
|
||||
struct wlr_surface *surface = surface_create(client,
|
||||
wl_resource_get_version(resource), id, compositor->renderer, NULL);
|
||||
if (surface == NULL) {
|
||||
wl_client_post_no_memory(client);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include "types/wlr_surface.h"
|
||||
#include "util/signal.h"
|
||||
#include "util/time.h"
|
||||
|
||||
|
|
@ -702,7 +703,7 @@ static void surface_handle_renderer_destroy(struct wl_listener *listener,
|
|||
wl_resource_destroy(surface->resource);
|
||||
}
|
||||
|
||||
struct wlr_surface *wlr_surface_create(struct wl_client *client,
|
||||
struct wlr_surface *surface_create(struct wl_client *client,
|
||||
uint32_t version, uint32_t id, struct wlr_renderer *renderer,
|
||||
struct wl_list *resource_list) {
|
||||
assert(version <= SURFACE_VERSION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue