mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-05 06:47:12 -04:00
opt: avoid pointer focus disable scene node
This commit is contained in:
parent
81319e99de
commit
af1f7850ee
1 changed files with 3 additions and 2 deletions
|
|
@ -1920,7 +1920,8 @@ buttonpress(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
xytonode(cursor->x, cursor->y, &surface, NULL, NULL, NULL, NULL);
|
xytonode(cursor->x, cursor->y, &surface, NULL, NULL, NULL, NULL);
|
||||||
if (toplevel_from_wlr_surface(surface, &c, &l) >= 0) {
|
if (toplevel_from_wlr_surface(surface, &c, &l) >= 0) {
|
||||||
if (c && (!client_is_unmanaged(c) || client_wants_focus(c)))
|
if (c && c->scene->node.enabled &&
|
||||||
|
(!client_is_unmanaged(c) || client_wants_focus(c)))
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
|
|
||||||
if (surface != old_pointer_focus_surface) {
|
if (surface != old_pointer_focus_surface) {
|
||||||
|
|
@ -4173,7 +4174,7 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
|
|
||||||
if (surface != seat->pointer_state.focused_surface && sloppyfocus && time &&
|
if (surface != seat->pointer_state.focused_surface && sloppyfocus && time &&
|
||||||
c && !client_is_unmanaged(c))
|
c && c->scene->node.enabled && !client_is_unmanaged(c))
|
||||||
focusclient(c, 0);
|
focusclient(c, 0);
|
||||||
|
|
||||||
/* If surface is NULL, clear pointer focus */
|
/* If surface is NULL, clear pointer focus */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue