From 179853c6c874aa6a5bbe32f056a400fe06a2d9e5 Mon Sep 17 00:00:00 2001 From: IoIxD Date: Mon, 21 Sep 2026 19:45:06 -0700 Subject: [PATCH] hte w --- src/backend/cairo.c | 16 ++++++++-------- src/backend/wayland/interfaces.c | 10 +++++++++- src/backend/wayland/wayland.c | 3 +-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/backend/cairo.c b/src/backend/cairo.c index 49f315c..9dab1c1 100644 --- a/src/backend/cairo.c +++ b/src/backend/cairo.c @@ -31,9 +31,9 @@ void MwLLCairoLine(struct _MwLLCairo handle, MwPoint* points, MwLLColor color) { cairo_set_source_rgba(handle.front_cairo_back, color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0, 1.0); for(i = 0; i < 2; i++) { if(i == 0) { - cairo_move_to(handle.front_cairo_back, points[i].x + 0.5, points[i].y + 0.5); + cairo_move_to(handle.front_cairo_back, points[i].x, points[i].y); } else { - cairo_line_to(handle.front_cairo_back, points[i].x + 0.5, points[i].y + 0.5); + cairo_line_to(handle.front_cairo_back, points[i].x, points[i].y); } } cairo_stroke(handle.front_cairo_back); @@ -219,8 +219,8 @@ static void MwLLFreeColorImpl(MwLLColor color) {} static MwBool lmao = MwFALSE; static int MwLLPendingImpl(MwLL handle) { - lmao = !lmao; - return lmao; + lmao = !lmao; + return lmao; } static void MwLLNextEventImpl(MwLL handle) { MwLLDispatch(handle, draw, NULL); @@ -264,10 +264,10 @@ static void MwLLRaiseImpl(MwLL handle) {} static void MwLLClipImpl(MwLL handle, MwRect* rect) {} static void MwLLSetupDragAndDropImpl(MwLL handle) {} static int MwLLCairoCallInitImpl(void) { - if(cairo_load_funcs() != 0) { - return 1; - } - return 0; + if(cairo_load_funcs() != 0) { + return 1; + } + return 0; } #include "call.c" CALL(Cairo); diff --git a/src/backend/wayland/interfaces.c b/src/backend/wayland/interfaces.c index 4aebb61..1b9fe1a 100644 --- a/src/backend/wayland/interfaces.c +++ b/src/backend/wayland/interfaces.c @@ -1505,11 +1505,19 @@ void MwLLWaylandSetupCallbacks(struct _MwLLWayland* wayland) { WL_INTERFACE(zwp_relative_pointer_manager_v1); WL_INTERFACE(xdg_wm_base); WL_INTERFACE(zwlr_layer_shell_v1); /* Only used for layer surface, but we use it always if it's turned into a tool window */ - WL_INTERFACE(wl_subcompositor); if(wayland->type == MwLL_WAYLAND_TOPLEVEL) { WL_INTERFACE(zxdg_decoration_manager_v1); WL_INTERFACE(xdg_toplevel_icon_manager_v1); + WL_INTERFACE(wl_subcompositor); + WL_INTERFACE(wl_seat); WL_INTERFACE(wp_fifo_manager_v1); + } else if(wayland->type == MwLL_WAYLAND_POPUP) { + WL_INTERFACE(wl_seat); + } else if(wayland->type == MwLL_WAYLAND_LAYER_SURFACE) { + WL_INTERFACE(wl_subcompositor); + WL_INTERFACE(wl_seat); + } else { + WL_INTERFACE(wl_subcompositor); } #undef WL_INTERFACE } diff --git a/src/backend/wayland/wayland.c b/src/backend/wayland/wayland.c index c944587..227ced4 100644 --- a/src/backend/wayland/wayland.c +++ b/src/backend/wayland/wayland.c @@ -892,7 +892,6 @@ static void widget_setup(MwLL r, MwLL parent, int x, int y, int width, int heigh r->wayland.parent = parent; r->wayland.valid = MwTRUE; - printf("type %d\n", ty); if(ty == MwLL_WAYLAND_UNKNOWN) { if(parent == NULL) { setup_toplevel(r, x, y); @@ -1986,7 +1985,7 @@ static int MwLLWaylandCallInitImpl(void) { #ifdef MW_OPENGL if(getenv("WSLENV") || getenv("WSL_DISTRO_NAME")) { - //loadWayland = 0; + // loadWayland = 0; } #endif