mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: optimize pointer focus reset in warp focus
This commit is contained in:
parent
c8bce2ec15
commit
6710dbd82a
1 changed files with 3 additions and 3 deletions
6
maomao.c
6
maomao.c
|
|
@ -6613,11 +6613,11 @@ void virtualkeyboard(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
void warp_cursor(const Client *c) {
|
void warp_cursor(const Client *c) {
|
||||||
if (cursor->x < c->geom.x || cursor->x > c->geom.x + c->geom.width ||
|
if (cursor->x < c->geom.x || cursor->x > c->geom.x + c->geom.width ||
|
||||||
cursor->y < c->geom.y || cursor->y > c->geom.y + c->geom.height)
|
cursor->y < c->geom.y || cursor->y > c->geom.y + c->geom.height) {
|
||||||
wlr_cursor_warp_closest(cursor, NULL, c->geom.x + c->geom.width / 2.0,
|
wlr_cursor_warp_closest(cursor, NULL, c->geom.x + c->geom.width / 2.0,
|
||||||
c->geom.y + c->geom.height / 2.0);
|
c->geom.y + c->geom.height / 2.0);
|
||||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void warp_cursor_to_selmon(const Monitor *m) {
|
void warp_cursor_to_selmon(const Monitor *m) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue