opt: optimize pointer focus for animaiton
This commit is contained in:
@@ -2737,6 +2737,7 @@ buttonpress(struct wl_listener *listener, void *data) {
|
|||||||
Client *tmpc;
|
Client *tmpc;
|
||||||
int ji;
|
int ji;
|
||||||
const MouseBinding *b;
|
const MouseBinding *b;
|
||||||
|
struct wlr_surface *old_pointer_focus_surface = seat->pointer_state.focused_surface;
|
||||||
|
|
||||||
handlecursoractivity();
|
handlecursoractivity();
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
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)))
|
if (c && (!client_is_unmanaged(c) || client_wants_focus(c)))
|
||||||
focusclient(c, 1);
|
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) {
|
if (l && l->layer_surface->current.keyboard_interactive) {
|
||||||
focusclient(NULL, 0);
|
focusclient(NULL, 0);
|
||||||
client_notify_enter(l->layer_surface->surface,
|
client_notify_enter(l->layer_surface->surface,
|
||||||
|
|||||||
Reference in New Issue
Block a user