mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-06 13:29:53 -05:00
opt: optimize pointer focus for animaiton
This commit is contained in:
parent
46ff9d54f1
commit
c0aa0a0d19
1 changed files with 6 additions and 0 deletions
|
|
@ -2737,6 +2737,7 @@ buttonpress(struct wl_listener *listener, void *data) {
|
|||
Client *tmpc;
|
||||
int ji;
|
||||
const MouseBinding *b;
|
||||
struct wlr_surface *old_pointer_focus_surface = seat->pointer_state.focused_surface;
|
||||
|
||||
handlecursoractivity();
|
||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||
|
|
@ -2753,6 +2754,11 @@ buttonpress(struct wl_listener *listener, void *data) {
|
|||
if (c && (!client_is_unmanaged(c) || client_wants_focus(c)))
|
||||
focusclient(c, 1);
|
||||
|
||||
if (surface != old_pointer_focus_surface) {
|
||||
wlr_seat_pointer_notify_clear_focus(seat);
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (l && l->layer_surface->current.keyboard_interactive) {
|
||||
focusclient(NULL, 0);
|
||||
client_notify_enter(l->layer_surface->surface,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue