From d00ac09a9b87de91c0eedc4642fd75c8e75e40d9 Mon Sep 17 00:00:00 2001 From: speckitor Date: Thu, 21 May 2026 12:34:35 +0700 Subject: [PATCH] something --- src/cursor.c | 5 +++++ src/keybinds.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cursor.c b/src/cursor.c index 7fcb638..747b0d3 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -76,6 +76,11 @@ static void process_cursor_move(absn_server *server) if (!toplevel->floating) { toplevel_set_floating(toplevel, true); } + + if (toplevel->output != server->focused_output) { + toplevel->output = server->focused_output; + toplevel->workspace = toplevel->output->workspace; + } } static void apply_resize(absn_toplevel *toplevel, struct wlr_box *new_geom) diff --git a/src/keybinds.c b/src/keybinds.c index b898a96..98feb29 100644 --- a/src/keybinds.c +++ b/src/keybinds.c @@ -202,7 +202,7 @@ void switch_workspace(absn_server *server, const absn_arg *arg) } } - if (toplevels_count == 0) { + if (toplevels_count == 0 && server->focused_output == server->workspaces[i].output) { server->focused_output->workspace->output = NULL; }