This commit is contained in:
Rakarake 2025-12-25 23:06:54 +01:00
parent ae999d1b83
commit 72a53cb6c8
3 changed files with 4 additions and 6 deletions

View file

@ -141,8 +141,6 @@ void render(Renderer *state, int w, int h, double time, char *shader_path, int r
state->shader_path = shader_path; state->shader_path = shader_path;
} }
checkGlError();
// Rendorrrr // Rendorrrr
glViewport(0, 0, w, h); glViewport(0, 0, w, h);

View file

@ -72,7 +72,7 @@ static void registry_handle_global(
// Set up wl_surface // Set up wl_surface
state->wl_surface = wl_compositor_create_surface(state->wl_compositor); 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( state->xdg_wm_base = wl_registry_bind(
registry, name, &xdg_wm_base_interface, 1); registry, name, &xdg_wm_base_interface, 1);
xdg_wm_base_add_listener(state->xdg_wm_base, 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_set_title(state->xdg_toplevel, "GLONKERS! 🕴️");
xdg_toplevel_add_listener(state->xdg_toplevel, &xdg_toplevel_listener, state); 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); state->zwlr_layer_shell_v1 = wl_registry_bind(registry, name, &zwlr_layer_shell_v1_interface, 4);
} }
if (strcmp(interface, wl_output_interface.name) == 0) { if (strcmp(interface, wl_output_interface.name) == 0) {

View file

@ -4,9 +4,9 @@
#include "wlr-layer-shell-unstable-v1-protocol.h" #include "wlr-layer-shell-unstable-v1-protocol.h"
/// A normal window /// A normal window
#define OUTPUT_WINDOW 0; #define OUTPUT_WINDOW 0
/// A desktop layer (wallpaper) /// A desktop layer (wallpaper)
#define OUTPUT_LAYER 1; #define OUTPUT_LAYER 1
struct client_state { struct client_state {
int width, height; int width, height;