15 Commits
Author SHA1 Message Date
Guido Cella 2d16962424 pass the object to LISTEN_STATIC handlers
wlroots 482d6e53 stopped passing the surface to the idle inhibitor
destroy and surface commit signals, which made destroyidleinhibitor()
and commitpopup() dereference NULL. Store the object in the listener
instead.
2026-10-27 23:33:14 +01:00
Guido Cella 7622bd3187 Merge branch 'main' into wlroots-next 2026-10-27 23:33:05 +01:00
Guido Cella 12a5856427 don't allocate memory for drag_icon_destroy
Not needed since dwl supports only one drag icon at a time.
2026-10-27 23:14:43 +01:00
save196 4ecb2a9df5 fix the focused border color after leaving an unmanaged client
Clients focused after an unmanaged client that wants focus didn't get
the focused border color. Regression from 87029e2.
2026-10-26 15:49:23 +02:00
Guido Cella 5af5dd5e7e update wlroots to 0.21 2026-09-25 13:43:13 +02:00
Guido Cella d3d4da3bd2 Merge branch 'main' into wlroots-next 2026-09-25 13:36:59 +02:00
julmajustus 88c0c68d59 Remove rendermon pending resize frame skip
This is no longer needed as wlroots => 0.19 handles this internally via scene-level surface state tracking and
linux-drm-syncobj explicit sync.

The manual commit skip now causes the c->resize to be stuck on non-zero
state which leads to choppy resizing experience.
2026-09-08 18:04:52 +03:00
A Frederick Christensen d41ecb745c add support for ext-image-copy-capture-v1 and ext-image-capture-source-v1 (wlroots!4545) 2026-03-08 17:35:11 +01:00
A Frederick Christensen 52c4fb58ec Revert "Post 0.3 release modification"
This reverts commit 38c7bd7ee8.
Accidental commit intended for a testing repository.
2026-03-01 19:54:28 -06:00
A Frederick Christensen 38c7bd7ee8 Post 0.3 release modification 2026-03-01 19:53:43 -06:00
A Frederick Christensen 6e1bfa86c7 Remove trailing whitespace from README
Adapted from PR #1188 by @diegoviola
2026-03-01 19:15:22 -06:00
A Frederick Christensen e32535cf97 Fix typos -- adapted from PR #1189 by @diegoviola 2026-03-01 19:10:43 -06:00
thanatos f4249db613 Updated README to clarify branch roles
This change effectively reverts DWL to the prior development model, where development of DWL itself happens against the current wlroots release, and changes in anticipation of the next wlroots release are made on a separate branch.
2026-02-21 11:51:17 -07:00
thanatos b2d2b701d7 Corrected README 2026-02-21 11:37:48 -07:00
Thanatos 2c9cb2af1b Bumped to 0.9 for wlroots-0.20.0. Updated cursor image buffer handling for xwayland 2026-02-21 11:33:09 -07:00
2 changed files with 29 additions and 23 deletions
+7 -7
View File
@@ -1,4 +1,4 @@
_VERSION = 0.10-dev
_VERSION = 0.9-dev
VERSION = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`
PKG_CONFIG = pkg-config
@@ -8,8 +8,8 @@ PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man
DATADIR = $(PREFIX)/share
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20`
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.21`
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.21`
# Allow using an alternative wlroots installation
# This has to have all the includes required by wlroots, e.g:
@@ -17,12 +17,12 @@ WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
# WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
# -I$(PWD)/wlroots/include
# Set -rpath to avoid using the wrong library.
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.20
# WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.21
# Assuming you ran "meson setup --prefix ${PWD}/0.20 build && ninja -C build install"
# Assuming you ran "meson setup --prefix ${PWD}/0.21 build && ninja -C build install"
#WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
# -I$(PWD)/wlroots/0.20/include/wlroots-0.20
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.20/lib64 -L$(PWD)/wlroots/0.20/lib64 -lwlroots-0.20
# -I$(PWD)/wlroots/0.21/include/wlroots-0.21
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.21/lib64 -L$(PWD)/wlroots/0.21/lib64 -lwlroots-0.21
XWAYLAND =
XLIBS =
+20 -14
View File
@@ -83,7 +83,7 @@
#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags]))
#define TAGMASK ((1u << TAGCOUNT) - 1)
#define LISTEN(E, L, H) wl_signal_add((E), ((L)->notify = (H), (L)))
#define LISTEN_STATIC(E, H) do { struct wl_listener *_l = ecalloc(1, sizeof(*_l)); _l->notify = (H); wl_signal_add((E), _l); } while (0)
#define LISTEN_STATIC(E, H, D) do { StaticListener *_l = ecalloc(1, sizeof(*_l)); _l->listener.notify = (H); _l->data = (D); wl_signal_add((E), &_l->listener); } while (0)
/* enums */
enum { CurNormal, CurPressed, CurMove, CurResize }; /* cursor */
@@ -263,6 +263,12 @@ typedef struct {
struct wl_listener destroy;
} SessionLock;
typedef struct {
/* Must keep this field first */
struct wl_listener listener;
void *data;
} StaticListener;
/* function declarations */
static void applybounds(Client *c, struct wlr_box *bbox);
static void applygeom(Client *c);
@@ -482,6 +488,7 @@ static struct wl_listener request_set_sel = {.notify = setsel};
static struct wl_listener request_set_cursor_shape = {.notify = setcursorshape};
static struct wl_listener request_start_drag = {.notify = requeststartdrag};
static struct wl_listener start_drag = {.notify = startdrag};
static struct wl_listener drag_icon_destroy = {.notify = destroydragicon};
static struct wl_listener new_session_lock = {.notify = locksession};
static struct wl_listener new_foreign_toplevel_capture_request = {.notify = capturerequest};
@@ -784,7 +791,7 @@ buttonpress(struct wl_listener *listener, void *data)
void
capturerequest(struct wl_listener *listener, void *data)
{
struct wlr_ext_foreign_toplevel_image_capture_source_manager_v1_request *request = data;
struct wlr_ext_foreign_toplevel_image_capture_source_manager_v1_request_event *request = data;
Client *view = request->toplevel_handle->data;
if (!view->image_capture_source) {
@@ -1047,8 +1054,8 @@ commitnotify(struct wl_listener *listener, void *data)
void
commitpopup(struct wl_listener *listener, void *data)
{
struct wlr_surface *surface = data;
struct wlr_xdg_popup *popup = wlr_xdg_popup_try_from_wlr_surface(surface);
StaticListener *sl = wl_container_of(listener, sl, listener);
struct wlr_xdg_popup *popup = sl->data;
LayerSurface *l = NULL;
Client *c = NULL;
struct wlr_box box;
@@ -1091,7 +1098,7 @@ void
createidleinhibitor(struct wl_listener *listener, void *data)
{
struct wlr_idle_inhibitor_v1 *idle_inhibitor = data;
LISTEN_STATIC(&idle_inhibitor->events.destroy, destroyidleinhibitor);
LISTEN_STATIC(&idle_inhibitor->events.destroy, destroyidleinhibitor, idle_inhibitor);
checkidleinhibitor(NULL);
}
@@ -1365,7 +1372,7 @@ createpopup(struct wl_listener *listener, void *data)
/* This event is raised when a client (either xdg-shell or layer-shell)
* creates a new popup. */
struct wlr_xdg_popup *popup = data;
LISTEN_STATIC(&popup->base->surface->events.commit, commitpopup);
LISTEN_STATIC(&popup->base->surface->events.commit, commitpopup, popup);
}
void
@@ -1423,15 +1430,15 @@ destroydragicon(struct wl_listener *listener, void *data)
focusclient(focustop(selmon), NULL, 1);
motionnotify(0, NULL, 0, 0, 0, 0);
wl_list_remove(&listener->link);
free(listener);
}
void
destroyidleinhibitor(struct wl_listener *listener, void *data)
{
/* `data` is the wlr_surface of the idle inhibitor being destroyed,
* at this point the idle inhibitor is still in the list of the manager */
checkidleinhibitor(wlr_surface_get_root_surface(data));
StaticListener *sl = wl_container_of(listener, sl, listener);
struct wlr_idle_inhibitor_v1 *idle_inhibitor = sl->data;
/* At this point the idle inhibitor is still in the list of the manager */
checkidleinhibitor(wlr_surface_get_root_surface(idle_inhibitor->surface));
wl_list_remove(&listener->link);
free(listener);
}
@@ -1610,7 +1617,6 @@ focusclient(Client *c, LayerSurface *l, int lift)
/* Don't change border color if there is an exclusive focus or we are
* handling a drag operation */
if (!(old_l && old_l->layer_surface->current.keyboard_interactive == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE)
&& !(old_c && client_wants_focus(old_c))
&& !seat->drag)
client_set_border_color(c, focuscolor);
}
@@ -2853,14 +2859,14 @@ setup(void)
foreign_toplevel_list = wlr_ext_foreign_toplevel_list_v1_create(dpy,1);
ext_foreign_toplevel_image_capture_source_manager_v1 =
wlr_ext_foreign_toplevel_image_capture_source_manager_v1_create(dpy, 1);
wl_signal_add(&ext_foreign_toplevel_image_capture_source_manager_v1->events.new_request,
wl_signal_add(&ext_foreign_toplevel_image_capture_source_manager_v1->events.capture_request,
&new_foreign_toplevel_capture_request);
/* Use decoration protocols to negotiate server-side decorations */
wlr_server_decoration_manager_set_default_mode(
wlr_server_decoration_manager_create(dpy),
WLR_SERVER_DECORATION_MANAGER_MODE_SERVER);
xdg_decoration_mgr = wlr_xdg_decoration_manager_v1_create(dpy);
xdg_decoration_mgr = wlr_xdg_decoration_manager_v1_create(dpy, 2);
wl_signal_add(&xdg_decoration_mgr->events.new_toplevel_decoration, &new_xdg_decoration);
pointer_constraints = wlr_pointer_constraints_v1_create(dpy);
@@ -3023,7 +3029,7 @@ startdrag(struct wl_listener *listener, void *data)
return;
drag->icon->data = &wlr_scene_drag_icon_create(drag_icon, drag->icon)->node;
LISTEN_STATIC(&drag->icon->events.destroy, destroydragicon);
wl_signal_add(&drag->icon->events.destroy, &drag_icon_destroy);
}
void