From 60b1fe634defd091c377fc9ae1c1fe0e800e0634 Mon Sep 17 00:00:00 2001 From: korei999 Date: Wed, 10 Jan 2024 16:58:45 +0200 Subject: [PATCH] update config --- config.def.h | 10 +++++----- dwl.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config.def.h b/config.def.h index 8795978..4c90ca2 100644 --- a/config.def.h +++ b/config.def.h @@ -46,11 +46,11 @@ static const Rule rules[] = { /* examples: { "Gimp", NULL, 0, 1, -1 }, */ - {"corectrl", NULL, 1 << 5, 0, -1}, - { NULL, "Save File", 0, 1, -1}, - { NULL, "Confirm to replace files", 0, 1, -1}, - { NULL, "File Operation Progress", 0, 1, -1}, - { NULL, "Seer Console", 0, 1, -1}, + {"corectrl", NULL, 1 << 5, 0, -1}, + { NULL, "Save File", 0, 1, -1}, + { NULL, "Confirm to replace files", 0, 1, -1}, + { NULL, "File Operation Progress", 0, 1, -1}, + { NULL, "Seer Console", 0, 1, -1}, }; /* layout(s) */ diff --git a/dwl.c b/dwl.c index 9ae1376..990cb78 100644 --- a/dwl.c +++ b/dwl.c @@ -1158,16 +1158,16 @@ void cursorwarptohint(void) { Client *c = NULL; - // double sx, sy; + double sx, sy; toplevel_from_wlr_surface(active_constraint->surface, &c, NULL); /* TODO: wlroots 0.18: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478 */ - // if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) { - // sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw; - // sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw; - // wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y); - // wlr_seat_pointer_warp(seat, sx, sy); - // } + if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) { + sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw; + sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw; + wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y); + wlr_seat_pointer_warp(seat, sx, sy); + } } void @@ -1176,7 +1176,7 @@ destroypointerconstraint(struct wl_listener *listener, void *data) PointerConstraint *pointer_constraint = wl_container_of(listener, pointer_constraint, destroy); if (active_constraint == pointer_constraint->constraint) { - cursorwarptohint(); + // cursorwarptohint(); active_constraint = NULL; }