diff options
author | Bartel Sielski <bartel.sielski@gmail.com> | 2021-10-03 22:01:33 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-10-04 16:25:35 +0200 |
commit | 8fa7b99859066b9098acb158d08f7a060c3bf78e (patch) | |
tree | 0a1a04363875d819beee13a4315c63094535f266 | |
parent | sway-input.5.scd: Fix spelling errors (diff) | |
download | sway-8fa7b99859066b9098acb158d08f7a060c3bf78e.tar.gz sway-8fa7b99859066b9098acb158d08f7a060c3bf78e.tar.zst sway-8fa7b99859066b9098acb158d08f7a060c3bf78e.zip |
idle_inhibit: Fix tree view after changes in commit 152a559e
Commit 152a559e replaced the view pointer in the inhibitor struct with a
pointer to the wlr_inhibitor for application inhibitors. But this was not
changed in the sway_idle_inhibit_v1_application_inhibitor_for_view function.
This caused a bug in the sway tree view where the application inhibitor is
always "none".
-rw-r--r-- | sway/desktop/idle_inhibit_v1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/desktop/idle_inhibit_v1.c b/sway/desktop/idle_inhibit_v1.c index a6ad7166..82353038 100644 --- a/sway/desktop/idle_inhibit_v1.c +++ b/sway/desktop/idle_inhibit_v1.c | |||
@@ -69,8 +69,8 @@ struct sway_idle_inhibitor_v1 *sway_idle_inhibit_v1_user_inhibitor_for_view( | |||
69 | struct sway_idle_inhibitor_v1 *inhibitor; | 69 | struct sway_idle_inhibitor_v1 *inhibitor; |
70 | wl_list_for_each(inhibitor, &server.idle_inhibit_manager_v1->inhibitors, | 70 | wl_list_for_each(inhibitor, &server.idle_inhibit_manager_v1->inhibitors, |
71 | link) { | 71 | link) { |
72 | if (inhibitor->view == view && | 72 | if (inhibitor->mode != INHIBIT_IDLE_APPLICATION && |
73 | inhibitor->mode != INHIBIT_IDLE_APPLICATION) { | 73 | inhibitor->view == view) { |
74 | return inhibitor; | 74 | return inhibitor; |
75 | } | 75 | } |
76 | } | 76 | } |
@@ -82,8 +82,8 @@ struct sway_idle_inhibitor_v1 *sway_idle_inhibit_v1_application_inhibitor_for_vi | |||
82 | struct sway_idle_inhibitor_v1 *inhibitor; | 82 | struct sway_idle_inhibitor_v1 *inhibitor; |
83 | wl_list_for_each(inhibitor, &server.idle_inhibit_manager_v1->inhibitors, | 83 | wl_list_for_each(inhibitor, &server.idle_inhibit_manager_v1->inhibitors, |
84 | link) { | 84 | link) { |
85 | if (inhibitor->view == view && | 85 | if (inhibitor->mode == INHIBIT_IDLE_APPLICATION && |
86 | inhibitor->mode == INHIBIT_IDLE_APPLICATION) { | 86 | view_from_wlr_surface(inhibitor->wlr_inhibitor->surface) == view) { |
87 | return inhibitor; | 87 | return inhibitor; |
88 | } | 88 | } |
89 | } | 89 | } |