diff --git a/+cmd b/+cmd new file mode 100644 index 0000000..3c01860 --- /dev/null +++ b/+cmd @@ -0,0 +1,8 @@ +WMAKER_USE_WAYLAND='1' WMAKER_WAYLAND_NESTED='1' LD_LIBRARY_PATH='/usr/local/lib' gdb -batch -ex 'set confirm off' -ex 'set filename-display absolute' -ex run -ex bt -ex quit --args src/.libs/wmaker --for-real >[2=1] + +WAYLAND_DISPLAY=wayland-0 foot + +./configure --prefix=/usr/local --enable-wayland +make clean +make -j8 CFLAGS='-fsanitize=leak' LDFLAGS='-fsanitize=leak' +win sudo make install diff --git a/WINGs/WINGs/WINGsP.h.in b/WINGs/WINGs/WINGsP.h.in index ebddfe3..a8c9a76 100644 --- a/WINGs/WINGs/WINGsP.h.in +++ b/WINGs/WINGs/WINGsP.h.in @@ -512,6 +512,8 @@ typedef struct W_FontBackend { unsigned long bpix, int bg_w, int bg_h, const char *text, int len); + int (*lookup_string)(void *sctx, struct W_View *view, struct WMEvent *event, + char *buffer, int buflen, unsigned long *keysym_out); } W_FontBackend; extern const W_FontBackend W_FontBackendX11; @@ -607,6 +609,13 @@ typedef struct W_ViewBackend { /* Trigger redisplay */ void (*redisplay)(void *vctx, struct W_View *view); + /* Selection ownership */ + Bool (*selection_acquire)(void *vctx, struct W_View *view, Atom selection, Time timestamp); + void (*selection_release)(void *vctx, struct W_View *view, Atom selection); + + /* Platform-specific post-init (e.g. X11 atoms, IM setup) */ + void (*platform_init)(struct W_Screen *scr); + /* Get screen position (for views that support it) */ WMPoint (*get_screen_position)(void *vctx, struct W_View *view); } W_ViewBackend; diff --git a/WINGs/selection.c b/WINGs/selection.c index 81cadfe..0f8bccb 100644 --- a/WINGs/selection.c +++ b/WINGs/selection.c @@ -335,7 +335,7 @@ Bool WMCreateSelectionHandler(WMView * view, Atom selection, Time timestamp, WMS SelectionHandler *handler; const W_ViewBackend *vb = view->screen->viewBackend; - if (!vb->selection_acquire(view->screen->viewBackendCtx, view, selection, timestamp)) { + if (vb->selection_acquire && !vb->selection_acquire(view->screen->viewBackendCtx, view, selection, timestamp)) { return False; } diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 397caa5..8a0ad16 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -3839,7 +3839,7 @@ wl_frame_configure(WNativeWindow win, int x, int y, int width, int height) /* Resize: reallocate the pixman image if dimensions changed. */ if (width > 0 && height > 0 && (width != fb->width || height != fb->height)) { - pixman_image_unref(fb->image); + //pixman_image_unref(fb->image); fb->image = pixman_image_create_bits(PIXMAN_a8r8g8b8, width, height, NULL, 0); fb->width = width; diff --git a/src/backend/x11/x11_backend.c b/src/backend/x11/x11_backend.c index 0afb354..b02b7f6 100644 --- a/src/backend/x11/x11_backend.c +++ b/src/backend/x11/x11_backend.c @@ -4449,9 +4449,3 @@ const WMBackend x11_backend = { */ const WMBackend *wm_backend = &x11_backend; - -/* Mechanism files compiled as part of X11 backend */ -#include "../../wmspec.c" -#include "../../xdnd.c" -#include "../../xmodifier.c" -