… | |
… | |
25 | * - extensive modifications |
25 | * - extensive modifications |
26 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
26 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
27 | * Copyright (c) 2001 Marius Gedminas |
27 | * Copyright (c) 2001 Marius Gedminas |
28 | * - Ctrl/Mod4+Tab works like Meta+Tab (options) |
28 | * - Ctrl/Mod4+Tab works like Meta+Tab (options) |
29 | * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> |
29 | * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> |
30 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
30 | * Copyright (c) 2003-2005 Marc Lehmann <pcg@goof.com> |
31 | * |
31 | * |
32 | * This program is free software; you can redistribute it and/or modify |
32 | * This program is free software; you can redistribute it and/or modify |
33 | * it under the terms of the GNU General Public License as published by |
33 | * it under the terms of the GNU General Public License as published by |
34 | * the Free Software Foundation; either version 2 of the License, or |
34 | * the Free Software Foundation; either version 2 of the License, or |
35 | * (at your option) any later version. |
35 | * (at your option) any later version. |
… | |
… | |
52 | |
52 | |
53 | #ifdef KEYSYM_RESOURCE |
53 | #ifdef KEYSYM_RESOURCE |
54 | # include "keyboard.h" |
54 | # include "keyboard.h" |
55 | #endif |
55 | #endif |
56 | |
56 | |
57 | #include <cwchar> |
|
|
58 | #include <csignal> |
57 | #include <csignal> |
59 | |
58 | |
60 | /*----------------------------------------------------------------------*/ |
59 | /*----------------------------------------------------------------------*/ |
61 | |
60 | |
62 | #define IS_CONTROL(ch) !((ch) & 0xffffff60UL) |
61 | #define IS_CONTROL(ch) !((ch) & 0xffffff60UL) |
… | |
… | |
118 | XK_Escape, 0x238b, |
117 | XK_Escape, 0x238b, |
119 | XK_Undo, 0x238c, |
118 | XK_Undo, 0x238c, |
120 | XK_Print, 0x2399, |
119 | XK_Print, 0x2399, |
121 | |
120 | |
122 | XK_space, 0x2423, |
121 | XK_space, 0x2423, |
|
|
122 | |
|
|
123 | #ifdef XK_KP_Begin |
|
|
124 | XK_KP_Prior, 0x21de, |
|
|
125 | XK_KP_Next, 0x21df, |
|
|
126 | XK_KP_Begin, 0x2320, |
|
|
127 | XK_KP_Insert, 0x2380, |
|
|
128 | XK_KP_Delete, 0x2326, |
123 | XK_KP_Space, 0x2422, |
129 | XK_KP_Space, 0x2422, |
|
|
130 | #endif |
124 | 0, |
131 | 0, |
125 | }; |
132 | }; |
126 | |
133 | |
127 | void |
134 | void |
128 | rxvt_term::iso14755_54 (int x, int y) |
135 | rxvt_term::iso14755_54 (int x, int y) |
… | |
… | |
277 | * use Num_Lock to toggle Keypad on/off. If Num_Lock is off, allow an |
284 | * use Num_Lock to toggle Keypad on/off. If Num_Lock is off, allow an |
278 | * escape sequence to toggle the Keypad. |
285 | * escape sequence to toggle the Keypad. |
279 | * |
286 | * |
280 | * Always permit `shift' to override the current setting |
287 | * Always permit `shift' to override the current setting |
281 | */ |
288 | */ |
282 | shft = (ev.state & ShiftMask); |
289 | shft = ev.state & ShiftMask; |
283 | ctrl = (ev.state & ControlMask); |
290 | ctrl = ev.state & ControlMask; |
284 | meta = (ev.state & ModMetaMask); |
291 | meta = ev.state & ModMetaMask; |
285 | |
292 | |
286 | if (numlock_state || (ev.state & ModNumLockMask)) |
293 | if (numlock_state || (ev.state & ModNumLockMask)) |
287 | { |
294 | { |
288 | numlock_state = (ev.state & ModNumLockMask); |
295 | numlock_state = (ev.state & ModNumLockMask); |
289 | PrivMode ((!numlock_state), PrivMode_aplKP); |
296 | PrivMode ((!numlock_state), PrivMode_aplKP); |
… | |
… | |
309 | |
316 | |
310 | // the XOpenIM manpage lies about hardcoding the locale |
317 | // the XOpenIM manpage lies about hardcoding the locale |
311 | // at the point of XOpenIM, so temporarily switch locales |
318 | // at the point of XOpenIM, so temporarily switch locales |
312 | if (rs[Rs_imLocale]) |
319 | if (rs[Rs_imLocale]) |
313 | SET_LOCALE (rs[Rs_imLocale]); |
320 | SET_LOCALE (rs[Rs_imLocale]); |
|
|
321 | |
314 | // assume wchar_t == unicode or better |
322 | // assume wchar_t == unicode or better |
315 | len = XwcLookupString (Input_Context, &ev, wkbuf, |
323 | len = XwcLookupString (Input_Context, &ev, wkbuf, |
316 | KBUFSZ, &keysym, &status_return); |
324 | KBUFSZ, &keysym, &status_return); |
|
|
325 | |
317 | if (rs[Rs_imLocale]) |
326 | if (rs[Rs_imLocale]) |
318 | SET_LOCALE (locale); |
327 | SET_LOCALE (locale); |
319 | |
328 | |
320 | if (status_return == XLookupChars |
329 | if (status_return == XLookupChars |
321 | || status_return == XLookupBoth) |
330 | || status_return == XLookupBoth) |
… | |
… | |
513 | else |
522 | else |
514 | strcpy (kbuf, key_backspace); |
523 | strcpy (kbuf, key_backspace); |
515 | break; |
524 | break; |
516 | #endif |
525 | #endif |
517 | #ifndef NO_DELETE_KEY |
526 | #ifndef NO_DELETE_KEY |
|
|
527 | # ifdef XK_KP_Prior |
|
|
528 | case XK_KP_Delete: |
|
|
529 | /* allow shift to override */ |
|
|
530 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
|
|
531 | { |
|
|
532 | strcpy (kbuf, "\033On"); |
|
|
533 | break; |
|
|
534 | } |
|
|
535 | /* FALLTHROUGH */ |
|
|
536 | # endif |
518 | case XK_Delete: |
537 | case XK_Delete: |
519 | strcpy (kbuf, key_delete); |
538 | strcpy (kbuf, key_delete); |
520 | break; |
539 | break; |
521 | #endif |
540 | #endif |
522 | case XK_Tab: |
541 | case XK_Tab: |
… | |
… | |
625 | #ifdef XK_KP_Begin |
644 | #ifdef XK_KP_Begin |
626 | case XK_KP_Begin: |
645 | case XK_KP_Begin: |
627 | strcpy (kbuf, "\033Ou"); |
646 | strcpy (kbuf, "\033Ou"); |
628 | break; |
647 | break; |
629 | |
648 | |
630 | case XK_KP_Insert: |
|
|
631 | strcpy (kbuf, "\033Op"); |
|
|
632 | break; |
|
|
633 | |
|
|
634 | case XK_KP_Delete: |
|
|
635 | strcpy (kbuf, "\033On"); |
|
|
636 | break; |
|
|
637 | #endif |
649 | #endif |
638 | case XK_KP_F1: /* "\033OP" */ |
650 | case XK_KP_F1: /* "\033OP" */ |
639 | case XK_KP_F2: /* "\033OQ" */ |
651 | case XK_KP_F2: /* "\033OQ" */ |
640 | case XK_KP_F3: /* "\033OR" */ |
652 | case XK_KP_F3: /* "\033OR" */ |
641 | case XK_KP_F4: /* "\033OS" */ |
653 | case XK_KP_F4: /* "\033OS" */ |
… | |
… | |
673 | break; |
685 | break; |
674 | |
686 | |
675 | case XK_Find: |
687 | case XK_Find: |
676 | strcpy (kbuf, "\033[1~"); |
688 | strcpy (kbuf, "\033[1~"); |
677 | break; |
689 | break; |
|
|
690 | |
|
|
691 | #ifdef XK_KP_End |
|
|
692 | case XK_KP_Insert: |
|
|
693 | /* allow shift to override */ |
|
|
694 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
|
|
695 | { |
|
|
696 | strcpy (kbuf, "\033Op"); |
|
|
697 | break; |
|
|
698 | } |
|
|
699 | /* FALLTHROUGH */ |
|
|
700 | #endif |
678 | case XK_Insert: |
701 | case XK_Insert: |
679 | strcpy (kbuf, "\033[2~"); |
702 | strcpy (kbuf, "\033[2~"); |
680 | break; |
703 | break; |
681 | #ifdef DXK_Remove /* support for DEC remove like key */ |
704 | #ifdef DXK_Remove /* support for DEC remove like key */ |
682 | case DXK_Remove: |
705 | case DXK_Remove: |
… | |
… | |
1309 | button_release (ev.xbutton); |
1332 | button_release (ev.xbutton); |
1310 | break; |
1333 | break; |
1311 | |
1334 | |
1312 | case ClientMessage: |
1335 | case ClientMessage: |
1313 | if (ev.xclient.format == 32 |
1336 | if (ev.xclient.format == 32 |
|
|
1337 | && ev.xclient.message_type == xa[XA_WM_PROTOCOLS]) |
|
|
1338 | { |
1314 | && (Atom)ev.xclient.data.l[0] == xa[XA_WMDELETEWINDOW]) |
1339 | if (ev.xclient.data.l[0] == xa[XA_WM_DELETE_WINDOW]) |
1315 | destroy (); |
1340 | destroy (); |
|
|
1341 | #if ENABLE_EWMH |
|
|
1342 | else if (ev.xclient.data.l[0] == xa[XA_NET_WM_PING]) |
|
|
1343 | XSendEvent (disp, ev.xclient.window = display->root, |
|
|
1344 | False, SubstructureRedirectMask | SubstructureNotifyMask, |
|
|
1345 | &ev); |
|
|
1346 | #endif |
|
|
1347 | } |
|
|
1348 | #if ENABLE_XEMBED |
|
|
1349 | else if (ev.xclient.format == 32 && ev.xclient.message_type == xa[XA_XEMBED]) |
|
|
1350 | { |
|
|
1351 | if (ev.xclient.data.l[1] == XEMBED_FOCUS_IN) |
|
|
1352 | focus_in (); |
|
|
1353 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
|
|
1354 | focus_out (); |
|
|
1355 | } |
|
|
1356 | #endif |
1316 | #ifdef OFFIX_DND |
1357 | #ifdef OFFIX_DND |
1317 | /* OffiX Dnd (drag 'n' drop) protocol */ |
1358 | /* OffiX Dnd (drag 'n' drop) protocol */ |
1318 | else if (ev.xclient.message_type == xa[XA_DNDPROTOCOL] |
1359 | else if (ev.xclient.message_type == xa[XA_DNDPROTOCOL] |
1319 | && (ev.xclient.data.l[0] == DndFile |
1360 | && (ev.xclient.data.l[0] == DndFile |
1320 | || ev.xclient.data.l[0] == DndDir |
1361 | || ev.xclient.data.l[0] == DndDir |
1321 | || ev.xclient.data.l[0] == DndLink)) |
1362 | || ev.xclient.data.l[0] == DndLink)) |
1322 | { |
1363 | { |
1323 | /* Get Dnd data */ |
1364 | /* Get Dnd data */ |
1324 | Atom ActualType; |
1365 | Atom ActualType; |
1325 | int ActualFormat; |
1366 | int ActualFormat; |
1326 | unsigned char *data; |
1367 | unsigned char *data; |
… | |
… | |
1369 | break; |
1410 | break; |
1370 | } |
1411 | } |
1371 | break; |
1412 | break; |
1372 | |
1413 | |
1373 | case FocusIn: |
1414 | case FocusIn: |
1374 | if (!TermWin.focus) |
1415 | focus_in (); |
1375 | { |
|
|
1376 | TermWin.focus = 1; |
|
|
1377 | want_refresh = 1; |
|
|
1378 | #ifdef USE_XIM |
|
|
1379 | if (Input_Context != NULL) |
|
|
1380 | { |
|
|
1381 | IMSetStatusPosition (); |
|
|
1382 | XSetICFocus (Input_Context); |
|
|
1383 | } |
|
|
1384 | #endif |
|
|
1385 | #ifdef CURSOR_BLINK |
|
|
1386 | if (options & Opt_cursorBlink) |
|
|
1387 | cursor_blink_ev.start (NOW + BLINK_INTERVAL); |
|
|
1388 | #endif |
|
|
1389 | #ifdef OFF_FOCUS_FADING |
|
|
1390 | if (rs[Rs_fade]) |
|
|
1391 | { |
|
|
1392 | pix_colors = pix_colors_focused; |
|
|
1393 | scr_recolour (); |
|
|
1394 | } |
|
|
1395 | #endif |
|
|
1396 | |
|
|
1397 | } |
|
|
1398 | break; |
1416 | break; |
1399 | |
1417 | |
1400 | case FocusOut: |
1418 | case FocusOut: |
1401 | if (TermWin.focus) |
1419 | focus_out (); |
1402 | { |
|
|
1403 | TermWin.focus = 0; |
|
|
1404 | want_refresh = 1; |
|
|
1405 | |
|
|
1406 | #if ENABLE_FRILLS || ISO_14755 |
|
|
1407 | iso14755buf = 0; |
|
|
1408 | #endif |
|
|
1409 | #if ENABLE_OVERLAY |
|
|
1410 | scr_overlay_off (); |
|
|
1411 | #endif |
|
|
1412 | #ifdef USE_XIM |
|
|
1413 | if (Input_Context != NULL) |
|
|
1414 | XUnsetICFocus (Input_Context); |
|
|
1415 | #endif |
|
|
1416 | #ifdef CURSOR_BLINK |
|
|
1417 | if (options & Opt_cursorBlink) |
|
|
1418 | cursor_blink_ev.stop (); |
|
|
1419 | hidden_cursor = 0; |
|
|
1420 | #endif |
|
|
1421 | #ifdef OFF_FOCUS_FADING |
|
|
1422 | if (rs[Rs_fade]) |
|
|
1423 | { |
|
|
1424 | pix_colors = pix_colors_unfocused; |
|
|
1425 | scr_recolour (); |
|
|
1426 | } |
|
|
1427 | #endif |
|
|
1428 | } |
|
|
1429 | break; |
1420 | break; |
1430 | |
1421 | |
1431 | case ConfigureNotify: |
1422 | case ConfigureNotify: |
1432 | if (ev.xconfigure.window == TermWin.parent[0]) |
1423 | if (ev.xconfigure.window == TermWin.parent[0]) |
1433 | { |
1424 | { |
… | |
… | |
1647 | scr_refresh (refresh_type); |
1638 | scr_refresh (refresh_type); |
1648 | refresh_limit = 0; |
1639 | refresh_limit = 0; |
1649 | scrollbar_show (1); |
1640 | scrollbar_show (1); |
1650 | } |
1641 | } |
1651 | break; |
1642 | break; |
|
|
1643 | } |
|
|
1644 | } |
|
|
1645 | |
|
|
1646 | void |
|
|
1647 | rxvt_term::focus_in () |
|
|
1648 | { |
|
|
1649 | if (!TermWin.focus) |
|
|
1650 | { |
|
|
1651 | TermWin.focus = 1; |
|
|
1652 | want_refresh = 1; |
|
|
1653 | #ifdef USE_XIM |
|
|
1654 | if (Input_Context != NULL) |
|
|
1655 | { |
|
|
1656 | IMSetStatusPosition (); |
|
|
1657 | XSetICFocus (Input_Context); |
|
|
1658 | } |
|
|
1659 | #endif |
|
|
1660 | #ifdef CURSOR_BLINK |
|
|
1661 | if (options & Opt_cursorBlink) |
|
|
1662 | cursor_blink_ev.start (NOW + BLINK_INTERVAL); |
|
|
1663 | #endif |
|
|
1664 | #ifdef OFF_FOCUS_FADING |
|
|
1665 | if (rs[Rs_fade]) |
|
|
1666 | { |
|
|
1667 | pix_colors = pix_colors_focused; |
|
|
1668 | scr_recolour (); |
|
|
1669 | } |
|
|
1670 | #endif |
|
|
1671 | } |
|
|
1672 | } |
|
|
1673 | |
|
|
1674 | void |
|
|
1675 | rxvt_term::focus_out () |
|
|
1676 | { |
|
|
1677 | if (TermWin.focus) |
|
|
1678 | { |
|
|
1679 | TermWin.focus = 0; |
|
|
1680 | want_refresh = 1; |
|
|
1681 | |
|
|
1682 | #if ENABLE_FRILLS || ISO_14755 |
|
|
1683 | iso14755buf = 0; |
|
|
1684 | #endif |
|
|
1685 | #if ENABLE_OVERLAY |
|
|
1686 | scr_overlay_off (); |
|
|
1687 | #endif |
|
|
1688 | #ifdef USE_XIM |
|
|
1689 | if (Input_Context != NULL) |
|
|
1690 | XUnsetICFocus (Input_Context); |
|
|
1691 | #endif |
|
|
1692 | #ifdef CURSOR_BLINK |
|
|
1693 | if (options & Opt_cursorBlink) |
|
|
1694 | cursor_blink_ev.stop (); |
|
|
1695 | hidden_cursor = 0; |
|
|
1696 | #endif |
|
|
1697 | #ifdef OFF_FOCUS_FADING |
|
|
1698 | if (rs[Rs_fade]) |
|
|
1699 | { |
|
|
1700 | pix_colors = pix_colors_unfocused; |
|
|
1701 | scr_recolour (); |
|
|
1702 | } |
|
|
1703 | #endif |
1652 | } |
1704 | } |
1653 | } |
1705 | } |
1654 | |
1706 | |
1655 | #if TRANSPARENT |
1707 | #if TRANSPARENT |
1656 | void |
1708 | void |
… | |
… | |
2581 | // some window managers resize the window early, and these programs |
2633 | // some window managers resize the window early, and these programs |
2582 | // then sometimes get the size wrong. |
2634 | // then sometimes get the size wrong. |
2583 | // unfortunately other programs are even more buggy and dislike |
2635 | // unfortunately other programs are even more buggy and dislike |
2584 | // being sent SIGWINCH, so only do it when we were in fact being |
2636 | // being sent SIGWINCH, so only do it when we were in fact being |
2585 | // resized. |
2637 | // resized. |
2586 | if (seen_resize) |
2638 | if (seen_resize && cmd_pid) |
2587 | kill (-cmd_pid, SIGWINCH); |
2639 | kill (-cmd_pid, SIGWINCH); |
2588 | } |
2640 | } |
2589 | |
2641 | |
2590 | /* Read a text string from the input buffer */ |
2642 | /* Read a text string from the input buffer */ |
2591 | unicode_t buf[UBUFSIZ]; |
2643 | unicode_t buf[UBUFSIZ]; |
… | |
… | |
3177 | { |
3229 | { |
3178 | switch (priv) |
3230 | switch (priv) |
3179 | { |
3231 | { |
3180 | case '>': |
3232 | case '>': |
3181 | if (ch == CSI_DA) /* secondary device attributes */ |
3233 | if (ch == CSI_DA) /* secondary device attributes */ |
3182 | tt_printf ("\033[>%d;%-.8s;0c", 'R', VSTRING); |
3234 | tt_printf ("\033[>%d;%c%c;0c", 'U', VERSION[0], VERSION[2]); |
3183 | break; |
3235 | break; |
3184 | case '?': |
3236 | case '?': |
3185 | if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') |
3237 | if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') |
3186 | process_terminal_mode (ch, priv, nargs, arg); |
3238 | process_terminal_mode (ch, priv, nargs, arg); |
3187 | break; |
3239 | break; |
… | |
… | |
3538 | else if (ch < 0x20) |
3590 | else if (ch < 0x20) |
3539 | return NULL; /* other control character - exit */ |
3591 | return NULL; /* other control character - exit */ |
3540 | |
3592 | |
3541 | seen_esc = false; |
3593 | seen_esc = false; |
3542 | |
3594 | |
3543 | if (n >= sizeof (string) - 1) |
3595 | if (n >= STRING_MAX - 1) |
3544 | // stop at some sane length |
3596 | // stop at some sane length |
3545 | return NULL; |
3597 | return NULL; |
3546 | |
3598 | |
3547 | if (ch == C0_SYN) |
3599 | if (ch == C0_SYN) |
3548 | string[n++] = cmd_get8 (); |
3600 | string[n++] = cmd_get8 (); |
… | |
… | |
3616 | set_window_color (color, str); |
3668 | set_window_color (color, str); |
3617 | } |
3669 | } |
3618 | |
3670 | |
3619 | /* |
3671 | /* |
3620 | * XTerm escape sequences: ESC ] Ps;Pt (ST|BEL) |
3672 | * XTerm escape sequences: ESC ] Ps;Pt (ST|BEL) |
3621 | * 0 = change iconName/title |
|
|
3622 | * 1 = change iconName |
|
|
3623 | * 2 = change title |
|
|
3624 | * 4 = change color |
|
|
3625 | * 10 = change fg color |
|
|
3626 | * 11 = change bg color |
|
|
3627 | * 12 = change text color |
|
|
3628 | * 13 = change mouse foreground color |
|
|
3629 | * 17 = change highlight character colour |
|
|
3630 | * 18 = change bold character color |
|
|
3631 | * 19 = change underlined character color |
|
|
3632 | * 46 = change logfile (not implemented) |
|
|
3633 | * 50 = change font |
|
|
3634 | * |
|
|
3635 | * rxvt extensions: |
|
|
3636 | * 20 = bg pixmap |
|
|
3637 | * 39 = change default fg color |
|
|
3638 | * 49 = change default bg color |
|
|
3639 | * 55 = dump scrollback buffer and all of screen |
|
|
3640 | * 701 = change locale |
|
|
3641 | * 702 = find font |
|
|
3642 | * 703 = menu |
|
|
3643 | */ |
3673 | */ |
3644 | void |
3674 | void |
3645 | rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) |
3675 | rxvt_term::process_xterm_seq (int op, const char *str, unsigned char resp) |
3646 | { |
3676 | { |
3647 | int changed = 0; |
3677 | int changed = 0; |
… | |
… | |
3746 | break; |
3776 | break; |
3747 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3777 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3748 | case XTerm_Color_BD: |
3778 | case XTerm_Color_BD: |
3749 | process_color_seq (XTerm_Color_BD, Color_BD, str, resp); |
3779 | process_color_seq (XTerm_Color_BD, Color_BD, str, resp); |
3750 | break; |
3780 | break; |
3751 | case XTerm_Color_IT: |
|
|
3752 | process_color_seq (XTerm_Color_IT, Color_IT, str, resp); |
|
|
3753 | break; |
|
|
3754 | case XTerm_Color_UL: |
3781 | case XTerm_Color_UL: |
3755 | process_color_seq (XTerm_Color_UL, Color_UL, str, resp); |
3782 | process_color_seq (XTerm_Color_UL, Color_UL, str, resp); |
3756 | break; |
3783 | break; |
3757 | case XTerm_Color_RV: |
3784 | case XTerm_Color_RV: |
3758 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
3785 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
3759 | break; |
3786 | break; |
|
|
3787 | case URxvt_Color_IT: |
|
|
3788 | process_color_seq (URxvt_Color_IT, Color_IT, str, resp); |
|
|
3789 | break; |
3760 | #endif |
3790 | #endif |
3761 | #if TRANSPARENT && TINTING |
3791 | #if TRANSPARENT && TINTING |
3762 | case XTerm_Color_tint: |
3792 | case URxvt_Color_tint: |
3763 | process_color_seq (XTerm_Color_tint, Color_tint, str, resp); |
3793 | process_color_seq (URxvt_Color_tint, Color_tint, str, resp); |
3764 | check_our_parents (); |
3794 | check_our_parents (); |
3765 | if (am_transparent) |
3795 | if (am_transparent) |
3766 | want_full_refresh = want_refresh = 1; |
3796 | want_full_refresh = want_refresh = 1; |
3767 | break; |
3797 | break; |
3768 | #endif |
3798 | #endif |
… | |
… | |
3802 | |
3832 | |
3803 | case XTerm_logfile: |
3833 | case XTerm_logfile: |
3804 | // TODO, when secure mode? |
3834 | // TODO, when secure mode? |
3805 | break; |
3835 | break; |
3806 | |
3836 | |
|
|
3837 | #ifdef MENUBAR |
|
|
3838 | case URxvt_Menu: |
|
|
3839 | if (options & Opt_insecure) |
|
|
3840 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
|
|
3841 | break; |
|
|
3842 | #endif |
|
|
3843 | #if 0 |
|
|
3844 | case XTerm_dumpscreen: /* no error notices */ |
|
|
3845 | { |
|
|
3846 | int fd; |
|
|
3847 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
|
|
3848 | { |
|
|
3849 | scr_dump (fd); |
|
|
3850 | close (fd); |
|
|
3851 | } |
|
|
3852 | } |
|
|
3853 | break; |
|
|
3854 | #endif |
3807 | case XTerm_font: |
3855 | case XTerm_font: |
3808 | op = URxvt_font; |
3856 | op = URxvt_font; |
3809 | case URxvt_font: |
3857 | case URxvt_font: |
3810 | #if ENABLE_STYLES |
3858 | #if ENABLE_STYLES |
3811 | case URxvt_boldFont: |
3859 | case URxvt_boldFont: |
… | |
… | |
3826 | set_fonts (); |
3874 | set_fonts (); |
3827 | } |
3875 | } |
3828 | break; |
3876 | break; |
3829 | |
3877 | |
3830 | #if ENABLE_FRILLS |
3878 | #if ENABLE_FRILLS |
3831 | case XTerm_locale: |
3879 | case URxvt_locale: |
3832 | if (query) |
3880 | if (query) |
3833 | tt_printf ("\33]%d;%-.250s%c", XTerm_locale, (options & Opt_insecure) ? locale : "", resp); |
3881 | tt_printf ("\33]%d;%-.250s%c", URxvt_locale, (options & Opt_insecure) ? locale : "", resp); |
3834 | else |
3882 | else |
3835 | { |
3883 | { |
3836 | set_locale (str); |
3884 | set_locale (str); |
3837 | pty.set_utf8_mode (enc_utf8); |
3885 | pty.set_utf8_mode (enc_utf8); |
3838 | # ifdef USE_XIM |
|
|
3839 | im_cb (); |
3886 | init_xlocale (); |
3840 | # endif |
|
|
3841 | } |
3887 | } |
3842 | break; |
3888 | break; |
3843 | #endif |
|
|
3844 | |
3889 | |
3845 | #ifdef MENUBAR |
3890 | case URxvt_view_up: |
3846 | case XTerm_Menu: |
3891 | case URxvt_view_down: |
3847 | if (options & Opt_insecure) |
3892 | int lines = atoi (str); |
3848 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
3893 | |
3849 | break; |
3894 | if (lines) |
3850 | #endif |
3895 | scr_page (op == URxvt_view_up ? UP : DN, lines); |
3851 | #if 0 |
|
|
3852 | case XTerm_dumpscreen: /* no error notices */ |
|
|
3853 | { |
3896 | else |
3854 | int fd; |
|
|
3855 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
|
|
3856 | { |
3897 | { |
3857 | scr_dump (fd); |
3898 | scr_erase_savelines (); |
3858 | close (fd); |
|
|
3859 | } |
3899 | } |
3860 | } |
3900 | |
3861 | break; |
3901 | break; |
3862 | #endif |
3902 | #endif |
3863 | } |
3903 | } |
3864 | } |
3904 | } |
3865 | /*----------------------------------------------------------------------*/ |
3905 | /*----------------------------------------------------------------------*/ |