mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-04 07:15:55 -04:00
fix: inhibit_regardless_of_visibility not apply in some case
This commit is contained in:
parent
d96334ff08
commit
f35524ed63
1 changed files with 6 additions and 3 deletions
|
|
@ -2012,23 +2012,26 @@ buttonpress(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
void checkidleinhibitor(struct wlr_surface *exclude) {
|
void checkidleinhibitor(struct wlr_surface *exclude) {
|
||||||
int inhibited = 0;
|
int inhibited = 0;
|
||||||
|
Client *c = NULL;
|
||||||
|
struct wlr_surface *surface = NULL;
|
||||||
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) {
|
||||||
struct wlr_surface *surface =
|
surface = wlr_surface_get_root_surface(inhibitor->surface);
|
||||||
wlr_surface_get_root_surface(inhibitor->surface);
|
|
||||||
|
|
||||||
if (exclude == surface) {
|
if (exclude == surface) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toplevel_from_wlr_surface(inhibitor->surface, &c, NULL);
|
||||||
|
|
||||||
if (inhibit_regardless_of_visibility) {
|
if (inhibit_regardless_of_visibility) {
|
||||||
inhibited = 1;
|
inhibited = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_scene_tree *tree = surface->data;
|
struct wlr_scene_tree *tree = surface->data;
|
||||||
if (!tree || tree->node.enabled) {
|
if (!tree || (tree->node.enabled && (!c || !c->animation.tagouting))) {
|
||||||
inhibited = 1;
|
inhibited = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue