aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--include/wlr/wayland/wlr_compositor.h25
-rw-r--r--wayland/CMakeLists.txt3
-rw-r--r--wayland/wlr_compositor.c60
4 files changed, 0 insertions, 89 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd3d4219..ae2397b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,7 +61,6 @@ add_subdirectory(backend)
add_subdirectory(types)
add_subdirectory(session)
add_subdirectory(render)
-add_subdirectory(wayland)
add_subdirectory(util)
add_subdirectory(example)
diff --git a/include/wlr/wayland/wlr_compositor.h b/include/wlr/wayland/wlr_compositor.h
deleted file mode 100644
index 2c2ade62..00000000
--- a/include/wlr/wayland/wlr_compositor.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _WLR_COMPOSITOR_H
-#define _WLR_COMPOSITOR_H
-#include <wayland-server.h>
-
-struct wlr_compositor_state;
-
-struct wlr_compositor {
- struct wlr_compositor_state *state;
- void *user_data;
- struct wl_global *wl_global;
- struct wl_list wl_resources;
-
- struct {
- /** Emits a reference to the wl_resource just created */
- struct wl_signal bound;
- /** Emits a reference to the wl_surface just created */
- struct wl_signal create_surface;
- /** Emits a reference to the wl_region just created */
- struct wl_signal create_region;
- } events;
-};
-
-struct wlr_compositor *wlr_compositor_init(struct wl_display *display);
-
-#endif
diff --git a/wayland/CMakeLists.txt b/wayland/CMakeLists.txt
deleted file mode 100644
index b629a95c..00000000
--- a/wayland/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_library(wlr-wayland STATIC
- wlr_compositor.c
-)
diff --git a/wayland/wlr_compositor.c b/wayland/wlr_compositor.c
deleted file mode 100644
index 631c22b6..00000000
--- a/wayland/wlr_compositor.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <assert.h>
-#include <stdlib.h>
-#include <wayland-server.h>
-#include <wlr/wayland/wlr_compositor.h>
-#include <wlr/util/log.h>
-
-static void wl_compositor_create_surface(struct wl_client *client,
- struct wl_resource *resource, uint32_t id) {
- wlr_log(L_DEBUG, "Creating surface for client");
-}
-
-static void wl_compositor_create_region(struct wl_client *client,
- struct wl_resource *resource, uint32_t id) {
- wlr_log(L_DEBUG, "Creating region for client");
-}
-
-static struct wl_compositor_interface wl_compositor_impl = {
- .create_surface = wl_compositor_create_surface,
- .create_region = wl_compositor_create_region,
-};
-
-static void wl_compositor_destroy(struct wl_resource *wl_resource) {
- struct wlr_compositor *wlr_c = wl_resource_get_user_data(wl_resource);
- struct wl_resource *_wl_resource = NULL;
- wl_resource_for_each(_wl_resource, &wlr_c->wl_resources) {
- if (_wl_resource == wl_resource) {
- struct wl_list *link = wl_resource_get_link(_wl_resource);
- wl_list_remove(link);
- break;
- }
- }
-}
-
-static void wl_compositor_bind(struct wl_client *wl_client,
- void *_wlr_compositor, uint32_t version, uint32_t id) {
- struct wlr_compositor *wlr_c = _wlr_compositor;
- assert(wl_client && wlr_c);
- if (version > 3) {
- wlr_log(L_ERROR, "Client requested unsupported wl_compositor version, disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
- struct wl_resource *wl_resource = wl_resource_create(
- wl_client, &wl_compositor_interface, version, id);
- wl_resource_set_implementation(wl_resource, &wl_compositor_impl,
- wlr_c, wl_compositor_destroy);
- wl_list_insert(&wlr_c->wl_resources, wl_resource_get_link(wl_resource));
-}
-
-struct wlr_compositor *wlr_compositor_init(struct wl_display *display) {
- struct wlr_compositor *wlr_c = calloc(1, sizeof(struct wlr_compositor));
- struct wl_global *wl_global = wl_global_create(display,
- &wl_compositor_interface, 1, wlr_c, wl_compositor_bind);
- wlr_c->wl_global = wl_global;
- wl_list_init(&wlr_c->wl_resources);
- wl_signal_init(&wlr_c->events.bound);
- wl_signal_init(&wlr_c->events.create_surface);
- wl_signal_init(&wlr_c->events.create_region);
- return wlr_c;
-}