|
9 | 9 |
|
10 | 10 | #include "twin_private.h" |
11 | 11 |
|
12 | | -#define TWIN_BW 0 |
13 | | -#define TWIN_TITLE_HEIGHT 20 |
14 | | - |
15 | 12 | twin_screen_t *twin_screen_create(twin_coord_t width, |
16 | 13 | twin_coord_t height, |
17 | 14 | twin_put_begin_t put_begin, |
@@ -139,10 +136,6 @@ static void twin_screen_span_pixmap(twin_screen_t maybe_unused *screen, |
139 | 136 | if (p->y + p->height <= y) |
140 | 137 | return; |
141 | 138 |
|
142 | | - /* Skip drawing the window's client area if the window is iconified. */ |
143 | | - if (p->window->iconify && y >= p->y + TWIN_BW + TWIN_TITLE_HEIGHT + TWIN_BW) |
144 | | - return; |
145 | | - |
146 | 139 | /* bounds check in x */ |
147 | 140 | p_left = left; |
148 | 141 | if (p_left < p->x) |
@@ -215,14 +208,20 @@ void twin_screen_update(twin_screen_t *screen) |
215 | 208 | } else |
216 | 209 | memset(span, 0xff, width * sizeof(twin_argb32_t)); |
217 | 210 |
|
218 | | - for (p = screen->bottom; p; p = p->up) |
219 | | - twin_screen_span_pixmap(screen, span, p, y, left, right, pop16, |
220 | | - pop32); |
| 211 | + for (p = screen->bottom; p; p = p->up) { |
| 212 | + /* Skip drawing the region of the iconified pixmap. */ |
| 213 | + if (!twin_pixmap_is_iconified(p, y)) |
| 214 | + twin_screen_span_pixmap(screen, span, p, y, left, right, |
| 215 | + pop16, pop32); |
| 216 | + } |
221 | 217 |
|
222 | 218 | #if defined(CONFIG_CURSOR) |
223 | | - if (screen->cursor) |
224 | | - twin_screen_span_pixmap(screen, span, screen->cursor, y, left, |
225 | | - right, pop16, pop32); |
| 219 | + if (screen->cursor) { |
| 220 | + /* Skip drawing the region of the iconified pixmap. */ |
| 221 | + if (!twin_pixmap_is_iconified(p, y)) |
| 222 | + twin_screen_span_pixmap(screen, span, screen->cursor, y, |
| 223 | + left, right, pop16, pop32); |
| 224 | + } |
226 | 225 | #endif |
227 | 226 |
|
228 | 227 | (*screen->put_span)(left, y, right, span, screen->closure); |
|
0 commit comments