Lines Matching +full:data +full:- +full:width
4 * util.c -- miscellaneous utilities for dialog
6 * Copyright 2000-2020,2021 Thomas E. Dickey
116 #define UseShadow(dw) ((dw) != 0 && (dw)->normal != 0 && (dw)->shadow != 0)
122 #define DATA(atr,upr,lwr,cmt) { atr COLOR_DATA(upr) RC_DATA(lwr,cmt) } macro
123 /* *INDENT-OFF* */
126 DATA(A_NORMAL, SCREEN, screen, "Screen"),
127 DATA(A_NORMAL, SHADOW, shadow, "Shadow"),
128 DATA(A_REVERSE, DIALOG, dialog, "Dialog box"),
129 DATA(A_REVERSE, TITLE, title, "Dialog box title"),
130 DATA(A_REVERSE, BORDER, border, "Dialog box border"),
131 DATA(A_BOLD, BUTTON_ACTIVE, button_active, "Active button"),
132 DATA(A_DIM, BUTTON_INACTIVE, button_inactive, "Inactive button"),
133 DATA(A_UNDERLINE, BUTTON_KEY_ACTIVE, button_key_active, "Active button key"),
134 DATA(A_UNDERLINE, BUTTON_KEY_INACTIVE, button_key_inactive, "Inactive button key"),
135 DATA(A_NORMAL, BUTTON_LABEL_ACTIVE, button_label_active, "Active button label"),
136 DATA(A_NORMAL, BUTTON_LABEL_INACTIVE, button_label_inactive, "Inactive button label"),
137 DATA(A_REVERSE, INPUTBOX, inputbox, "Input box"),
138 DATA(A_REVERSE, INPUTBOX_BORDER, inputbox_border, "Input box border"),
139 DATA(A_REVERSE, SEARCHBOX, searchbox, "Search box"),
140 DATA(A_REVERSE, SEARCHBOX_TITLE, searchbox_title, "Search box title"),
141 DATA(A_REVERSE, SEARCHBOX_BORDER, searchbox_border, "Search box border"),
142 DATA(A_REVERSE, POSITION_INDICATOR, position_indicator, "File position indicator"),
143 DATA(A_REVERSE, MENUBOX, menubox, "Menu box"),
144 DATA(A_REVERSE, MENUBOX_BORDER, menubox_border, "Menu box border"),
145 DATA(A_REVERSE, ITEM, item, "Item"),
146 DATA(A_NORMAL, ITEM_SELECTED, item_selected, "Selected item"),
147 DATA(A_REVERSE, TAG, tag, "Tag"),
148 DATA(A_REVERSE, TAG_SELECTED, tag_selected, "Selected tag"),
149 DATA(A_NORMAL, TAG_KEY, tag_key, "Tag key"),
150 DATA(A_BOLD, TAG_KEY_SELECTED, tag_key_selected, "Selected tag key"),
151 DATA(A_REVERSE, CHECK, check, "Check box"),
152 DATA(A_REVERSE, CHECK_SELECTED, check_selected, "Selected check box"),
153 DATA(A_REVERSE, UARROW, uarrow, "Up arrow"),
154 DATA(A_REVERSE, DARROW, darrow, "Down arrow"),
155 DATA(A_NORMAL, ITEMHELP, itemhelp, "Item help-text"),
156 DATA(A_BOLD, FORM_ACTIVE_TEXT, form_active_text, "Active form text"),
157 DATA(A_REVERSE, FORM_TEXT, form_text, "Form text"),
158 DATA(A_NORMAL, FORM_ITEM_READONLY, form_item_readonly, "Readonly form item"),
159 DATA(A_REVERSE, GAUGE, gauge, "Dialog box gauge"),
160 DATA(A_REVERSE, BORDER2, border2, "Dialog box border2"),
161 DATA(A_REVERSE, INPUTBOX_BORDER2, inputbox_border2, "Input box border2"),
162 DATA(A_REVERSE, SEARCHBOX_BORDER2, searchbox_border2, "Search box border2"),
163 DATA(A_REVERSE, MENUBOX_BORDER2, menubox_border2, "Menu box border2")
165 #undef DATA
166 /* *INDENT-ON* */
178 p->normal = parent; in add_subwindow()
179 p->shadow = child; in add_subwindow()
180 p->getc_timeout = WTIMEOUT_OFF; in add_subwindow()
181 p->next = dialog_state.all_subwindows; in add_subwindow()
194 if (p->normal == parent) { in del_subwindows()
195 delwin(p->shadow); in del_subwindows()
196 r = p->next; in del_subwindows()
200 q->next = r; in del_subwindows()
206 p = p->next; in del_subwindows()
225 dlg_print_text(stdscr, dialog_vars.backtitle, COLS - 2, &attr); in dlg_put_backtitle()
226 for (i = 0; i < COLS - backwidth; i++) in dlg_put_backtitle()
229 for (i = 0; i < COLS - 2; i++) in dlg_put_backtitle()
241 dlg_attr_clear(WINDOW *win, int height, int width, chtype attr) in dlg_attr_clear() argument
248 for (j = 0; j < width; j++) in dlg_attr_clear()
277 * directly when stdout is redirected. By default we require the "--stdout"
321 * --input-fd option is used, it may be anything.
324 * if --stdout or --output-fd is used, it may be anything. We are concerned
346 if (dlg_parse_rc() == -1) /* Read the configuration file */ in init_dialog()
355 * As in the --stdout (see below), reopening the terminal does not always in init_dialog()
356 * work properly. dialog provides a --pipe-fd option for this purpose. We in init_dialog()
370 dlg_exiterr("cannot open tty-input"); in init_dialog()
378 dlg_exiterr("cannot open tty-input"); in init_dialog()
388 * If stdout is not a tty and dialog is called with the --stdout option, we in init_dialog()
403 * from the login user to another non-privileged user. in init_dialog()
414 dlg_exiterr("cannot open tty-output"); in init_dialog()
449 * Cancel xterm's alternate-screen mode. in dlg_keep_tite()
479 * implementation of alternate-screen in rxvt, etc., which clear in dlg_keep_tite()
498 static int defined_colors = 1; /* pair-0 is reserved */
643 * terminal cursor at the lower-left corner of the screen. in end_dialog()
673 result -= hidden; in dlg_count_real_columns()
680 centered(int width, const char *string) in centered() argument
685 left = (width - need) / 2 - 1; in centered()
707 *combined = (int) len - 1; in is_combining()
713 *combined -= 1; in is_combining()
754 indx[limit] - indx[1]); in dlg_print_listitem()
818 *attr |= define_color(win, code - '0'); in dlg_print_text()
899 tabbed += (x_after - x_before); in dlg_print_text()
953 && !isblank(UCH(prompt[indx[n - 1]]))) { in dlg_print_line()
959 n += (ESCAPE_LEN - 1); in dlg_print_line()
974 while (wrap_inx > 0 && isblank(UCH(prompt[indx[wrap_inx - 1]]))) { in dlg_print_line()
975 wrap_inx--; in dlg_print_line()
1000 hidden -= ESCAPE_LEN; in dlg_print_line()
1004 hidden -= ESCAPE_LEN; in dlg_print_line()
1017 dlg_print_text(win, prompt, (cols[wrap_inx] - hidden), attr); in dlg_print_line()
1025 *x -= hidden; in dlg_print_line()
1048 int lm = (2 * MARGIN); /* left margin (box-border plus a space) */ in justify_text()
1056 rm -= (2 * MARGIN); in justify_text()
1057 bm -= (2 * MARGIN); in justify_text()
1095 /* Set the final height and width for the calling function */ in justify_text()
1108 dlg_print_autowrap(WINDOW *win, const char *prompt, int height, int width) in dlg_print_autowrap() argument
1112 width, in dlg_print_autowrap()
1118 * that we create a "tall" window of the proper width, let the text wrap within
1129 int width, in dlg_print_scrolled() argument
1140 int wide = width - (2 * MARGIN); in dlg_print_scrolled()
1153 dummy = newwin(high, width, 0, 0); in dlg_print_scrolled()
1156 dlg_print_autowrap(win, prompt, height + 1 + (3 * MARGIN), width); in dlg_print_scrolled()
1164 dlg_print_autowrap(dummy, prompt, high, width); in dlg_print_scrolled()
1193 (void) wmove(win, MARGIN + height, wide - 4); in dlg_print_scrolled()
1198 whline(win, dlg_boxchar(ACS_HLINE), 4 - len); in dlg_print_scrolled()
1202 last = (y - height); in dlg_print_scrolled()
1209 dlg_print_autowrap(win, prompt, height + 1 + (3 * MARGIN), width); in dlg_print_scrolled()
1238 --(*offset); in dlg_check_scrolled()
1250 *offset -= page; in dlg_check_scrolled()
1265 code = -1; in dlg_check_scrolled()
1278 auto_size_preformatted(const char *prompt, int *height, int *width) in auto_size_preformatted() argument
1282 int max_y = SLINES - 1; in auto_size_preformatted()
1283 int max_x = SCOLS - 2; in auto_size_preformatted()
1293 * width proportionately. in auto_size_preformatted()
1303 * If the aspect ratio is too small after decreasing the width, then in auto_size_preformatted()
1304 * incrementally increase the width until the aspect ratio is equal to or in auto_size_preformatted()
1314 *width = wide; in auto_size_preformatted()
1319 * widget width at least this long, we can avoid splitting a word on the
1341 * if (height or width == -1) Maximize()
1342 * if (height or width == 0), justify and return actual limits.
1347 int *height, int *width, in real_auto_size() argument
1355 int save_wide = *width; in real_auto_size()
1361 *height = -1; in real_auto_size()
1362 if (*width == 0) in real_auto_size()
1363 *width = -1; in real_auto_size()
1367 max_wide = (*width < 0); in real_auto_size()
1372 high = SLINES - y; in real_auto_size()
1375 if (*width <= 0) { in real_auto_size()
1387 justify_text((WINDOW *) 0, prompt, high, wide, height, width); in real_auto_size()
1389 auto_size_preformatted(prompt, height, width); in real_auto_size()
1392 wide = SCOLS - x; in real_auto_size()
1393 justify_text((WINDOW *) 0, prompt, high, wide, height, width); in real_auto_size()
1397 if (*width < title_length) { in real_auto_size()
1398 justify_text((WINDOW *) 0, prompt, high, title_length, height, width); in real_auto_size()
1399 *width = title_length; in real_auto_size()
1403 dialog_state.text_width = *width; in real_auto_size()
1405 if (*width < mincols && save_wide == 0) in real_auto_size()
1406 *width = mincols; in real_auto_size()
1408 *width += ((2 * MARGIN) + SHADOW_COLS); in real_auto_size()
1415 *width = save_wide; in real_auto_size()
1418 *height = SLINES - (dialog_vars.begin_set ? dialog_vars.begin_y : 0); in real_auto_size()
1420 *width = SCOLS - (dialog_vars.begin_set ? dialog_vars.begin_x : 0); in real_auto_size()
1429 int *width, in dlg_auto_size() argument
1434 *height, *width, in dlg_auto_size()
1437 real_auto_size(title, prompt, height, width, boxlines, mincols); in dlg_auto_size()
1439 if (*width > SCOLS) { in dlg_auto_size()
1441 *width = SCOLS; in dlg_auto_size()
1448 *height, *width, in dlg_auto_size()
1453 * if (height or width == -1) Maximize()
1454 * if (height or width == 0)
1456 * width=MIN(SCOLS, MAX(longer line+n, mincols));
1462 int *width, in dlg_auto_sizefile() argument
1476 if ((*height == -1) || (*width == -1)) { in dlg_auto_sizefile()
1477 *height = SLINES - (dialog_vars.begin_set ? dialog_vars.begin_y : 0); in dlg_auto_sizefile()
1478 *width = SCOLS - (dialog_vars.begin_set ? dialog_vars.begin_x : 0); in dlg_auto_sizefile()
1480 if ((*height != 0) && (*width != 0)) { in dlg_auto_sizefile()
1482 if (*width > SCOLS) in dlg_auto_sizefile()
1483 *width = SCOLS; in dlg_auto_sizefile()
1499 offset += dialog_state.tab_len - (offset % dialog_state.tab_len); in dlg_auto_sizefile()
1514 *width = MIN(SCOLS, MAX((len + nc), mincols)); in dlg_auto_sizefile()
1515 /* here width and height can be maximized if > SCOLS|SLINES because in dlg_auto_sizefile()
1516 textbox-like widgets don't put all <file> on the screen. in dlg_auto_sizefile()
1517 Msgbox-like widget instead have to put all <text> correctly. */ in dlg_auto_sizefile()
1527 * boxchar is used to color the right/lower edges. It also is fill-color used
1531 * boxchar, and menubox_attr for borderchar since the scroll-arrows are drawn
1535 * If you want a raised effect (and are not going to use the scroll-arrows),
1539 dlg_draw_box2(WINDOW *win, int y, int x, int height, int width, in dlg_draw_box2() argument
1548 for (j = 0; j < width; j++) in dlg_draw_box2()
1551 else if (i == height - 1 && !j) in dlg_draw_box2()
1553 else if (!i && j == width - 1) in dlg_draw_box2()
1555 else if (i == height - 1 && j == width - 1) in dlg_draw_box2()
1559 else if (i == height - 1) in dlg_draw_box2()
1563 else if (j == width - 1) in dlg_draw_box2()
1572 dlg_draw_box(WINDOW *win, int y, int x, int height, int width, in dlg_draw_box() argument
1575 dlg_draw_box2(win, y, x, height, width, boxchar, borderchar, boxchar); in dlg_draw_box()
1580 * input-window, i.e., a window where we might use wgetch.
1582 * The all-windows list has normal- and shadow-windows. Since we never use the
1583 * shadow as an input window, normally we just look for the normal-window.
1585 * However, the all-subwindows list stores parent/child windows rather than
1595 for (p = list; p != 0; p = p->next) { in find_window()
1596 WINDOW *check = normal ? p->normal : p->shadow; in find_window()
1611 * against an asynchronous window-deletion that might invalidate the input
1627 * wide-character data.
1653 int y_want = y + getbegy(dw->shadow); in window_at_cell()
1654 int x_want = x + getbegx(dw->shadow); in window_at_cell()
1656 for (p = dialog_state.all_windows; p != 0; p = p->next) { in window_at_cell()
1657 if (dw->normal != p->normal in window_at_cell()
1658 && dw->shadow != p->normal in window_at_cell()
1659 && (result = in_window(p->normal, y_want, x_want)) != 0) { in window_at_cell()
1685 /* in the right-side */ in in_shadow()
1709 for (p = dialog_state.all_windows; p != 0; p = p->next) { in last_shadow()
1710 if (p->normal != dw->normal in last_shadow()
1711 && in_shadow(p->normal, dw->shadow, y, x)) { in last_shadow()
1722 WINDOW *win = dw->shadow; in repaint_cell()
1728 && (y2 = (y + getbegy(win) - getbegy(cellwin))) >= 0 in repaint_cell()
1729 && (x2 = (x + getbegx(win) - getbegx(cellwin))) >= 0 in repaint_cell()
1755 repaint_shadow(DIALOG_WINDOWS * dw, bool draw, int y, int x, int height, int width) in repaint_shadow() argument
1761 chtype save = dlg_get_attrs(dw->shadow); in repaint_shadow()
1762 dlg_attrset(dw->shadow, draw ? shadow_attr : screen_attr); in repaint_shadow()
1765 for (j = 0; j < width; ++j) { in repaint_shadow()
1771 RepaintCell(dw, draw, i + y + SHADOW_ROWS, j + x + width); in repaint_shadow()
1774 (void) wnoutrefresh(dw->shadow); in repaint_shadow()
1776 dlg_attrset(dw->shadow, save); in repaint_shadow()
1782 * Draw a shadow on the parent window corresponding to the right- and
1783 * bottom-edge of the child window, to give a 3-dimensional look.
1791 getbegy(dw->normal) - getbegy(dw->shadow), in draw_childs_shadow()
1792 getbegx(dw->normal) - getbegx(dw->shadow), in draw_childs_shadow()
1793 getmaxy(dw->normal), in draw_childs_shadow()
1794 getmaxx(dw->normal)); in draw_childs_shadow()
1799 * Erase a shadow on the parent window corresponding to the right- and
1800 * bottom-edge of the child window.
1808 getbegy(dw->normal) - getbegy(dw->shadow), in erase_childs_shadow()
1809 getbegx(dw->normal) - getbegx(dw->shadow), in erase_childs_shadow()
1810 getmaxy(dw->normal), in erase_childs_shadow()
1811 getmaxx(dw->normal)); in erase_childs_shadow()
1820 dlg_draw_shadow(WINDOW *win, int y, int x, int height, int width) in dlg_draw_shadow() argument
1822 repaint_shadow(SearchTopWindows(win), TRUE, y, x, height, width); in dlg_draw_shadow()
1833 /* *INDENT-OFF* */ in dlg_exit()
1847 /* *INDENT-ON* */ in dlg_exit()
1863 * Prior to 2004/12/19, a widget using --item-help would exit with "OK" in dlg_exit()
1886 * Just in case of using --input-fd option, do not in dlg_exit()
1903 #define DATA(name) { DLG_EXIT_ ## name, #name } macro
1904 /* *INDENT-OFF* */
1909 DATA(ESC),
1910 DATA(UNKNOWN),
1911 DATA(ERROR),
1912 DATA(OK),
1913 DATA(CANCEL),
1914 DATA(HELP),
1915 DATA(EXTRA),
1916 DATA(ITEM_HELP),
1918 #undef DATA
1919 /* *INDENT-ON* */
2002 * the function-return. Use this when only values greater than zero are
2009 char *data = getenv(name); in dlg_getenv_num() local
2010 if (data != NULL) { in dlg_getenv_num()
2012 long check = strtol(data, &temp, 0); in dlg_getenv_num()
2013 if (temp != 0 && temp != data && *temp == '\0') { in dlg_getenv_num()
2034 dlg_print_size(int height, int width) in dlg_print_size() argument
2037 fprintf(dialog_state.output, "Size: %d, %d\n", height, width); in dlg_print_size()
2038 DLG_TRACE(("# print size: %dx%d\n", height, width)); in dlg_print_size()
2043 dlg_ctl_size(int height, int width) in dlg_ctl_size() argument
2046 if ((width > COLS) || (height > LINES)) { in dlg_ctl_size()
2047 dlg_exiterr("Window too big. (height, width) = (%d, %d). Max allowed (%d, %d).", in dlg_ctl_size()
2048 height, width, LINES, COLS); in dlg_ctl_size()
2052 && ((width > SCOLS || height > SLINES))) { in dlg_ctl_size()
2053 if ((width <= COLS) && (height <= LINES)) { in dlg_ctl_size()
2057 dlg_exiterr("Window+Shadow too big. (height, width) = (%d, %d). Max allowed (%d, %d).", in dlg_ctl_size()
2058 height, width, SLINES, SCOLS); in dlg_ctl_size()
2066 * If the --tab-correct was not selected, convert tabs to single spaces.
2085 int rows = SLINES - (dialog_vars.begin_set ? dialog_vars.begin_y : 0); in dlg_calc_listh()
2086 if (rows - (*height) > 0) { in dlg_calc_listh()
2087 if (rows - (*height) > item_no) in dlg_calc_listh()
2090 *list_height = rows - (*height); in dlg_calc_listh()
2173 result = '-'; in dlg_asciibox()
2203 dlg_box_x_ordinate(int width) in dlg_box_x_ordinate() argument
2210 /* center dialog box on screen unless --begin-set */ in dlg_box_x_ordinate()
2211 x = (SCOLS - width) / 2; in dlg_box_x_ordinate()
2224 /* center dialog box on screen unless --begin-set */ in dlg_box_y_ordinate()
2225 y = (SLINES - height) / 2; in dlg_box_y_ordinate()
2240 dlg_print_text(win, title, getmaxx(win) - x, &attr); in dlg_draw_title()
2249 int width = getmaxx(win); in dlg_draw_bottom_box2() local
2254 (void) wmove(win, height - 3, 0); in dlg_draw_bottom_box2()
2256 for (i = 0; i < width - 2; i++) in dlg_draw_bottom_box2()
2261 (void) wmove(win, height - 2, 1); in dlg_draw_bottom_box2()
2262 for (i = 0; i < width - 2; i++) in dlg_draw_bottom_box2()
2282 * If --keep-window was set, do not delete/repaint the windows. in dlg_del_window()
2296 for (p = dialog_state.all_windows, q = r = 0; p != 0; r = p, p = p->next) { in dlg_del_window()
2297 if (p->normal == win) { in dlg_del_window()
2298 q = p; /* found a match - should be only one */ in dlg_del_window()
2300 dialog_state.all_windows = p->next; in dlg_del_window()
2302 r->next = p->next; in dlg_del_window()
2305 if (p->shadow != 0) { in dlg_del_window()
2306 touchwin(p->shadow); in dlg_del_window()
2307 wnoutrefresh(p->shadow); in dlg_del_window()
2309 touchwin(p->normal); in dlg_del_window()
2310 wnoutrefresh(p->normal); in dlg_del_window()
2317 del_subwindows(q->normal); in dlg_del_window()
2318 dlg_unregister_window(q->normal); in dlg_del_window()
2319 delwin(q->normal); in dlg_del_window()
2329 dlg_new_window(int height, int width, int y, int x) in dlg_new_window() argument
2331 return dlg_new_modal_window(stdscr, height, width, y, x); in dlg_new_window()
2339 dlg_new_modal_window(WINDOW *parent, int height, int width, int y, int x) in dlg_new_modal_window() argument
2346 || (win = newwin(height, width, y, x)) == 0) { in dlg_new_modal_window()
2348 y, x, height, width); in dlg_new_modal_window()
2350 p->next = dialog_state.all_windows; in dlg_new_modal_window()
2351 p->normal = win; in dlg_new_modal_window()
2352 p->getc_timeout = WTIMEOUT_OFF; in dlg_new_modal_window()
2356 p->shadow = parent; in dlg_new_modal_window()
2366 * dlg_getc() uses the return-value to determine how to handle an ERR return
2367 * from a non-blocking read:
2370 * b) if zero, it was a non-blocking read, or
2391 p->getc_timeout = interval; in dlg_set_timeout()
2402 wtimeout(win, p->getc_timeout); in dlg_reset_timeout()
2413 dlg_move_window(WINDOW *win, int height, int width, int y, int x) in dlg_move_window() argument
2418 dlg_ctl_size(height, width); in dlg_move_window()
2421 (void) wresize(win, height, width); in dlg_move_window()
2424 if (p->shadow != 0) { in dlg_move_window()
2426 (void) mvwin(p->shadow, y + SHADOW_ROWS, x + SHADOW_COLS); in dlg_move_window()
2428 p->shadow = 0; in dlg_move_window()
2476 dlg_der_window(WINDOW *parent, int height, int width, int y, int x) in dlg_der_window() argument
2483 if ((win = derwin(parent, height, width, y, x)) != 0) { in dlg_der_window()
2491 dlg_sub_window(WINDOW *parent, int height, int width, int y, int x) in dlg_sub_window() argument
2495 if ((win = subwin(parent, height, width, y, x)) == 0) { in dlg_sub_window()
2496 dlg_exiterr("Can't make sub-window at (%d,%d), size (%d,%d).\n", in dlg_sub_window()
2497 y, x, height, width); in dlg_sub_window()
2532 while (items->name != 0) { in dlg_default_listitem()
2533 if (!strcmp(dialog_vars.default_item, items->name)) { in dlg_default_listitem()
2554 (void) wmove(stdscr, LINES - 1, 0); in dlg_item_help()
2557 dlg_print_text(stdscr, txt, COLS - 1, &attr); in dlg_item_help()
2586 cmp = ac - bc; in dlg_strcmp()
2603 while (dst-- != base) { in trim_blank()
2660 if (!isblank(UCH(*(s - 1)))) { in dlg_trim_string()
2668 else if (!isblank(UCH(*(s - 1)))) { in dlg_trim_string()
2728 * Setup a fixed-buffer for the result.
2797 * These are characters that (aside from the quote-delimiter) will have to
2798 * be escaped in a single- or double-quoted string.
2804 * Returns the quote-delimiter.
2863 * When adding a result, make that depend on whether "--quoted" is used.
2905 if (USE_ITEM_HELP(item->help)) { in dlg_add_help_listitem()
2906 *tag = dialog_vars.help_tags ? item->name : item->help; in dlg_add_help_listitem()
2909 *tag = item->name; in dlg_add_help_listitem()
2917 if (USE_ITEM_HELP(item->help)) { in dlg_add_help_formitem()
2918 *tag = dialog_vars.help_tags ? item->name : item->help; in dlg_add_help_formitem()
2921 *tag = item->name; in dlg_add_help_formitem()
2926 * Some widgets support only one value of a given variable - save/restore the
2936 * Most of the data in DIALOG_VARS is normally set by command-line options.
3039 for (p = dialog_state.all_subwindows; p != 0; p = p->next) { in dlg_wgetparent()
3040 if (p->shadow == win) { in dlg_wgetparent()
3041 result = p->normal; in dlg_wgetparent()