We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea107c6 commit a667adfCopy full SHA for a667adf
display/threads/ui.c
@@ -167,7 +167,9 @@ static void *rotate_panes(void *arg)
167
168
int sleep_time = 1000;
169
170
- for (size_t i = 0;; i++) {
+ size_t idx_increment = 1;
171
+
172
+ for (size_t i = 0;; i += idx_increment) {
173
r = pthread_mutex_lock(&ctx->panes.lock);
174
175
if (r != 0)
@@ -192,6 +194,7 @@ static void *rotate_panes(void *arg)
192
194
// cancellation fd
193
195
break;
196
} else if (fds[1].revents &= POLLIN) {
197
+ idx_increment = 0;
198
char buf[1];
199
if (read(fds[1].fd, buf, 1) != 1) {
200
fprintf(stderr,
@@ -206,6 +209,7 @@ static void *rotate_panes(void *arg)
206
209
sleep_time -= delta;
207
210
continue;
208
211
} else {
212
+ idx_increment = 1;
213
sleep_time = 1000;
214
}
215
0 commit comments