diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 62f75bd64..48b2ba7be 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -313,17 +313,21 @@ int32_t focusmon(const Arg *arg) { return 0; selmon = tm; - if (config.warpcursor) { - warp_cursor_to_selmon(selmon); - } c = arg->tc ? arg->tc : focustop(selmon); if (!c) { selmon->sel = NULL; wlr_seat_pointer_notify_clear_focus(seat); wlr_seat_keyboard_notify_clear_focus(seat); focusclient(NULL, 0); - } else + if (config.warpcursor) { + warp_cursor_to_selmon(selmon); + } + } else { focusclient(c, 1); + if (config.warpcursor) { + warp_cursor(c); + } + } return 0; } @@ -1303,7 +1307,7 @@ int32_t tagmon(const Arg *arg) { arrange(selmon, false, false); } if (config.warpcursor) { - warp_cursor_to_selmon(c->mon); + warp_cursor(c); } return 0; }