mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-15 05:17:29 -08:00
inhibit idle if fullscreen client is focused
This commit is contained in:
parent
9b2966d27c
commit
5adc681b87
1 changed files with 4 additions and 0 deletions
4
dwl.c
4
dwl.c
|
@ -689,6 +689,7 @@ chvt(const Arg *arg)
|
||||||
void
|
void
|
||||||
checkidleinhibitor(struct wlr_surface *exclude)
|
checkidleinhibitor(struct wlr_surface *exclude)
|
||||||
{
|
{
|
||||||
|
Client *c = focustop(selmon, 0);
|
||||||
int inhibited = 0, unused_lx, unused_ly;
|
int inhibited = 0, unused_lx, unused_ly;
|
||||||
struct wlr_idle_inhibitor_v1 *inhibitor;
|
struct wlr_idle_inhibitor_v1 *inhibitor;
|
||||||
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
|
wl_list_for_each(inhibitor, &idle_inhibit_mgr->inhibitors, link) {
|
||||||
|
@ -701,6 +702,9 @@ checkidleinhibitor(struct wlr_surface *exclude)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c && c->isfullscreen)
|
||||||
|
inhibited = 1;
|
||||||
|
|
||||||
wlr_idle_notifier_v1_set_inhibited(idle_notifier, inhibited);
|
wlr_idle_notifier_v1_set_inhibited(idle_notifier, inhibited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue