mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-15 08:21:41 -04:00
opt: optimize sloppyfocus
This commit is contained in:
parent
c04949d3db
commit
3137156162
1 changed files with 4 additions and 2 deletions
|
|
@ -4112,8 +4112,10 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
|
||||||
uint32_t time) {
|
uint32_t time) {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
|
|
||||||
if (surface != seat->pointer_state.focused_surface && sloppyfocus && time &&
|
if (sloppyfocus && c && time && c->scene->node.enabled &&
|
||||||
c && c->scene->node.enabled && !client_is_unmanaged(c))
|
(surface != seat->pointer_state.focused_surface ||
|
||||||
|
(selmon && selmon->sel && c != selmon->sel)) &&
|
||||||
|
!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