decompose wl_backend.c: extract wl_events.c

This commit is contained in:
Window Maker 2026-06-02 11:58:23 +02:00
parent a9a3f0ff1d
commit 6044c6418b
4 changed files with 46 additions and 36 deletions

View File

@ -172,7 +172,8 @@ wmaker_SOURCES += \
backend/wayland/wl_xkb.c \
backend/wayland/wl_badge.c \
backend/wayland/wl_fakeleader.c \
backend/wayland/wl_extensions.c
backend/wayland/wl_extensions.c \
backend/wayland/wl_events.c
endif
if USE_NESTED_FUNC

View File

@ -5452,41 +5452,6 @@ wl_keyboard_ungrab(void)
}
/* ------------------------------------------------------------------ */
/* Events */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
static Bool
wl_noop_screen_get_head_usable_area(WScreen *scr, int head,
int *x1, int *y1, int *x2, int *y2)
{
(void)scr; (void)head; (void)x1; (void)y1; (void)x2; (void)y2;
/* Layer-shell strut tracking not yet wired; full head is usable. */
return False;
}
/* WNativeWindow map / unmap / geometry */
/* ------------------------------------------------------------------ */
static int
wl_coords_translate(WNativeWindow src, WNativeWindow dst,
int src_x, int src_y, int *dst_x, int *dst_y)
{
(void)src; (void)dst;
*dst_x = src_x; *dst_y = src_y;
return 0;
}

View File

@ -0,0 +1,40 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "wl_types.h"
/* ------------------------------------------------------------------ */
/* Events */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
Bool
wl_noop_screen_get_head_usable_area(WScreen *scr, int head,
int *x1, int *y1, int *x2, int *y2)
{
(void)scr; (void)head; (void)x1; (void)y1; (void)x2; (void)y2;
/* Layer-shell strut tracking not yet wired; full head is usable. */
return False;
}
/* WNativeWindow map / unmap / geometry */
/* ------------------------------------------------------------------ */
int
wl_coords_translate(WNativeWindow src, WNativeWindow dst,
int src_x, int src_y, int *dst_x, int *dst_y)
{
(void)src; (void)dst;
*dst_x = src_x; *dst_y = src_y;
return 0;
}

View File

@ -537,3 +537,7 @@ int wl_signalfd_handler(int fd, uint32_t mask, void *data);
void wl_handle_inotify_events(void);
void wl_event_loop_run(void);
void wl_event_loop_terminate(void);
/* Events module (extracted to wl_events.c) */
Bool wl_noop_screen_get_head_usable_area(WScreen *scr, int head, int *x1, int *y1, int *x2, int *y2);
int wl_coords_translate(WNativeWindow src, WNativeWindow dst, int src_x, int src_y, int *dst_x, int *dst_y);