mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
Fix border commands from changing focus
This commit is contained in:
parent
cf3ab1f45f
commit
82cd55a670
5 changed files with 13 additions and 11 deletions
|
|
@ -41,7 +41,7 @@ struct cmd_results *cmd_border(int argc, char **argv) {
|
|||
|
||||
struct sway_seat *seat = input_manager_current_seat(input_manager);
|
||||
if (seat->cursor) {
|
||||
cursor_send_pointer_motion(seat->cursor, 0);
|
||||
cursor_send_pointer_motion(seat->cursor, 0, false);
|
||||
}
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct cmd_results *seat_cmd_cursor(int argc, char **argv) {
|
|||
int delta_x = strtol(argv[1], NULL, 10);
|
||||
int delta_y = strtol(argv[2], NULL, 10);
|
||||
wlr_cursor_move(cursor->cursor, NULL, delta_x, delta_y);
|
||||
cursor_send_pointer_motion(cursor, 0);
|
||||
cursor_send_pointer_motion(cursor, 0, true);
|
||||
} else if (strcasecmp(argv[0], "set") == 0) {
|
||||
if (argc < 3) {
|
||||
return cmd_results_new(CMD_INVALID, "cursor", expected_syntax);
|
||||
|
|
@ -45,7 +45,7 @@ struct cmd_results *seat_cmd_cursor(int argc, char **argv) {
|
|||
float x = strtof(argv[1], NULL) / root_container.width;
|
||||
float y = strtof(argv[2], NULL) / root_container.height;
|
||||
wlr_cursor_warp_absolute(cursor->cursor, NULL, x, y);
|
||||
cursor_send_pointer_motion(cursor, 0);
|
||||
cursor_send_pointer_motion(cursor, 0, true);
|
||||
} else {
|
||||
if (argc < 2) {
|
||||
return cmd_results_new(CMD_INVALID, "cursor", expected_syntax);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue