mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
fix idle inhibitor check
previously we tried to get a client from the surface and then compare it with the excluded surface, if we cannot get a client from the surface (e.g: a layer surface) it just ignored all the next idle inhibitors no matter what What I have should done is just checking if the excluded surface is equal to the current idle inhibitor's surface and continue in case it is.
This commit is contained in:
parent
1bb9c4583a
commit
f8f94c97f5
1 changed files with 4 additions and 4 deletions
8
dwl.c
8
dwl.c
|
@ -694,14 +694,14 @@ chvt(const Arg *arg)
|
||||||
void
|
void
|
||||||
checkidleinhibitor(struct wlr_surface *exclude)
|
checkidleinhibitor(struct wlr_surface *exclude)
|
||||||
{
|
{
|
||||||
Client *c, *w;
|
|
||||||
int inhibited = 0;
|
int inhibited = 0;
|
||||||
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) {
|
||||||
c = client_from_wlr_surface(inhibitor->surface);
|
Client *c;
|
||||||
if (exclude && (!(w = client_from_wlr_surface(exclude)) || w == c))
|
if (exclude == inhibitor->surface)
|
||||||
continue;
|
continue;
|
||||||
if (!c || VISIBLEON(c, c->mon)) {
|
if (!(c = client_from_wlr_surface(inhibitor->surface))
|
||||||
|
|| VISIBLEON(c, c->mon)) {
|
||||||
inhibited = 1;
|
inhibited = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue