From 72a53cb6c8c479cfa6dbe79d214b14c50e2ed054 Mon Sep 17 00:00:00 2001 From: Rakarake Date: Thu, 25 Dec 2025 23:06:54 +0100 Subject: [PATCH] fixes --- renderer.c | 2 -- wayland.c | 4 ++-- wayland.h | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/renderer.c b/renderer.c index cdb071f..db03eca 100644 --- a/renderer.c +++ b/renderer.c @@ -141,8 +141,6 @@ void render(Renderer *state, int w, int h, double time, char *shader_path, int r state->shader_path = shader_path; } - checkGlError(); - // Rendorrrr glViewport(0, 0, w, h); diff --git a/wayland.c b/wayland.c index 924b81e..6660521 100644 --- a/wayland.c +++ b/wayland.c @@ -72,7 +72,7 @@ static void registry_handle_global( // Set up wl_surface state->wl_surface = wl_compositor_create_surface(state->wl_compositor); } - if (strcmp(interface, xdg_wm_base_interface.name) == 0) { + if ((strcmp(interface, xdg_wm_base_interface.name) == 0) && (state->output_type == OUTPUT_WINDOW)) { state->xdg_wm_base = wl_registry_bind( registry, name, &xdg_wm_base_interface, 1); xdg_wm_base_add_listener(state->xdg_wm_base, @@ -85,7 +85,7 @@ static void registry_handle_global( xdg_toplevel_set_title(state->xdg_toplevel, "GLONKERS! 🕴️"); xdg_toplevel_add_listener(state->xdg_toplevel, &xdg_toplevel_listener, state); } - if (strcmp(interface, zwlr_layer_shell_v1_interface.name) == 0) { + if ((strcmp(interface, zwlr_layer_shell_v1_interface.name) == 0) && (state->output_type == OUTPUT_LAYER)) { state->zwlr_layer_shell_v1 = wl_registry_bind(registry, name, &zwlr_layer_shell_v1_interface, 4); } if (strcmp(interface, wl_output_interface.name) == 0) { diff --git a/wayland.h b/wayland.h index bcc4098..6b705ff 100644 --- a/wayland.h +++ b/wayland.h @@ -4,9 +4,9 @@ #include "wlr-layer-shell-unstable-v1-protocol.h" /// A normal window -#define OUTPUT_WINDOW 0; +#define OUTPUT_WINDOW 0 /// A desktop layer (wallpaper) -#define OUTPUT_LAYER 1; +#define OUTPUT_LAYER 1 struct client_state { int width, height;