From 83bdb3ad0759a8043f0010e4bfd18f03b88f1e1e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 7 Dec 2021 16:19:26 +0100 Subject: [PATCH] examples/layer-shell: remove wlroots dependency This is a client example, it shouldn't use a compositor library like wlroots. --- examples/layer-shell.c | 13 +++++-------- examples/meson.build | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/layer-shell.c b/examples/layer-shell.c index 274858d4..56a8d4aa 100644 --- a/examples/layer-shell.c +++ b/examples/layer-shell.c @@ -11,7 +11,6 @@ #include #include #include -#include #include "egl_common.h" #include "wlr-layer-shell-unstable-v1-client-protocol.h" #include "xdg-shell-client-protocol.h" @@ -177,8 +176,7 @@ static const struct xdg_surface_listener xdg_surface_listener = { static void xdg_popup_configure(void *data, struct xdg_popup *xdg_popup, int32_t x, int32_t y, int32_t width, int32_t height) { - wlr_log(WLR_DEBUG, "Popup configured %dx%d@%d,%d", - width, height, x, y); + fprintf(stderr, "Popup configured %dx%d@%d,%d\n", width, height, x, y); popup_width = width; popup_height = height; if (popup_egl_window) { @@ -197,7 +195,7 @@ static void popup_destroy(void) { } static void xdg_popup_done(void *data, struct xdg_popup *xdg_popup) { - wlr_log(WLR_DEBUG, "Popup done"); + fprintf(stderr, "Popup done\n"); popup_destroy(); } @@ -377,17 +375,17 @@ static void wl_keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, static void wl_keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys) { - wlr_log(WLR_DEBUG, "Keyboard enter"); + fprintf(stderr, "Keyboard enter\n"); } static void wl_keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface) { - wlr_log(WLR_DEBUG, "Keyboard leave"); + fprintf(stderr, "Keyboard leave\n"); } static void wl_keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, uint32_t time, uint32_t key, uint32_t state) { - wlr_log(WLR_DEBUG, "Key event: %d %d", key, state); + fprintf(stderr, "Key event: %d %d\n", key, state); } static void wl_keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard, @@ -473,7 +471,6 @@ static const struct wl_registry_listener registry_listener = { }; int main(int argc, char **argv) { - wlr_log_init(WLR_DEBUG, NULL); char *namespace = "wlroots"; int exclusive_zone = 0; int32_t margin_right = 0, margin_bottom = 0, margin_left = 0; diff --git a/examples/meson.build b/examples/meson.build index 3ec4dac4..3189f0b4 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -82,7 +82,7 @@ clients = { }, 'layer-shell': { 'src': ['layer-shell.c', 'egl_common.c'], - 'dep': [wayland_egl, wayland_cursor, wlroots, egl, glesv2], + 'dep': [wayland_egl, wayland_cursor, egl, glesv2], 'proto': [ 'wlr-layer-shell-unstable-v1', 'xdg-shell',