… | |
… | |
519 | # endif |
519 | # endif |
520 | return; |
520 | return; |
521 | } |
521 | } |
522 | else |
522 | else |
523 | { |
523 | { |
524 | # if ENABLE_OVERLAY |
524 | # if ISO_14755 |
525 | scr_overlay_off (); |
525 | scr_overlay_off (); |
526 | # endif |
526 | # endif |
527 | iso14755buf = 0; |
527 | iso14755buf = 0; |
528 | } |
528 | } |
529 | } |
529 | } |
530 | else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) |
530 | else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) |
531 | || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) |
531 | || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) |
532 | if (!(iso14755buf & ISO_14755_STARTED)) |
532 | if (!(iso14755buf & ISO_14755_STARTED)) |
533 | { |
533 | { |
534 | iso14755buf |= ISO_14755_STARTED; |
534 | iso14755buf |= ISO_14755_STARTED; |
535 | # if ENABLE_OVERLAY |
535 | # if ISO_14755 |
536 | scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); |
536 | scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); |
537 | scr_overlay_set (0, 0, "ISO 14755 mode"); |
537 | scr_overlay_set (0, 0, "ISO 14755 mode"); |
538 | # endif |
538 | # endif |
539 | } |
539 | } |
540 | #endif |
540 | #endif |
… | |
… | |
728 | |
728 | |
729 | case XK_Find: |
729 | case XK_Find: |
730 | strcpy (kbuf, "\033[1~"); |
730 | strcpy (kbuf, "\033[1~"); |
731 | break; |
731 | break; |
732 | |
732 | |
733 | #ifdef XK_KP_End |
733 | #ifdef XK_KP_Insert |
734 | case XK_KP_Insert: |
734 | case XK_KP_Insert: |
735 | /* allow shift to override */ |
735 | /* allow shift to override */ |
736 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
736 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
737 | { |
737 | { |
738 | strcpy (kbuf, "\033Op"); |
738 | strcpy (kbuf, "\033Op"); |
… | |
… | |
934 | #if ENABLE_FRILLS || ISO_14755 |
934 | #if ENABLE_FRILLS || ISO_14755 |
935 | // ISO 14755 support |
935 | // ISO 14755 support |
936 | if (iso14755buf) |
936 | if (iso14755buf) |
937 | if (iso14755buf & ISO_14755_52) |
937 | if (iso14755buf & ISO_14755_52) |
938 | { |
938 | { |
939 | # if ENABLE_OVERLAY |
939 | # if ISO_14755 |
940 | scr_overlay_off (); |
940 | scr_overlay_off (); |
941 | # endif |
941 | # endif |
942 | # if ISO_14755 |
942 | # if ISO_14755 |
943 | // iso14755 part 5.2 handling: release time |
943 | // iso14755 part 5.2 handling: release time |
944 | // first: controls |
944 | // first: controls |
… | |
… | |
967 | |
967 | |
968 | return; |
968 | return; |
969 | } |
969 | } |
970 | else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) |
970 | else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) |
971 | { |
971 | { |
972 | # if ENABLE_OVERLAY |
972 | # if ISO_14755 |
973 | scr_overlay_off (); |
973 | scr_overlay_off (); |
974 | # endif |
974 | # endif |
975 | if (iso14755buf & ISO_14755_51) |
975 | if (iso14755buf & ISO_14755_51) |
976 | commit_iso14755 (); |
976 | commit_iso14755 (); |
977 | #if ISO_14755 |
977 | #if ISO_14755 |
… | |
… | |
1433 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
1433 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
1434 | focus_out (); |
1434 | focus_out (); |
1435 | } |
1435 | } |
1436 | #endif |
1436 | #endif |
1437 | } |
1437 | } |
1438 | break; |
|
|
1439 | |
|
|
1440 | case MappingNotify: |
|
|
1441 | XRefreshKeyboardMapping (&ev.xmapping); |
|
|
1442 | break; |
1438 | break; |
1443 | |
1439 | |
1444 | /* |
1440 | /* |
1445 | * XXX: this is not the _current_ arrangement |
1441 | * XXX: this is not the _current_ arrangement |
1446 | * Here's my conclusion: |
1442 | * Here's my conclusion: |
… | |
… | |
1489 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1485 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1490 | { |
1486 | { |
1491 | seen_resize = 1; |
1487 | seen_resize = 1; |
1492 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1488 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1493 | #ifdef XPM_BACKGROUND |
1489 | #ifdef XPM_BACKGROUND |
|
|
1490 | /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */ |
1494 | if (!option (Opt_transparent) && bgPixmap.auto_resize) |
1491 | if (!option (Opt_transparent) && bgPixmap.window_size_sensitive ()) |
1495 | { |
1492 | { |
1496 | resize_pixmap (); |
1493 | bgPixmap.render_background (); |
1497 | scr_touch (true); |
1494 | scr_touch (true); |
1498 | } |
1495 | } |
1499 | #endif |
1496 | #endif |
1500 | } |
1497 | } |
1501 | |
1498 | |
1502 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1499 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1503 | |
1500 | |
1504 | #ifdef ENABLE_TRANSPARENCY |
1501 | #ifdef ENABLE_TRANSPARENCY |
1505 | if (option (Opt_transparent)) |
1502 | if (option (Opt_transparent)) |
1506 | check_our_parents (); |
1503 | bgPixmap.render_background (); |
1507 | #endif |
1504 | #endif |
1508 | } |
1505 | } |
1509 | break; |
1506 | break; |
1510 | |
1507 | |
1511 | case PropertyNotify: |
1508 | case PropertyNotify: |
… | |
… | |
1783 | |
1780 | |
1784 | #if ENABLE_FRILLS || ISO_14755 |
1781 | #if ENABLE_FRILLS || ISO_14755 |
1785 | if (iso14755buf) |
1782 | if (iso14755buf) |
1786 | { |
1783 | { |
1787 | iso14755buf = 0; |
1784 | iso14755buf = 0; |
1788 | # if ENABLE_OVERLAY |
1785 | # if ISO_14755 |
1789 | scr_overlay_off (); |
1786 | scr_overlay_off (); |
1790 | # endif |
1787 | # endif |
1791 | } |
1788 | } |
1792 | #endif |
1789 | #endif |
1793 | #if USE_XIM |
1790 | #if USE_XIM |
… | |
… | |
1838 | case PropertyNotify: |
1835 | case PropertyNotify: |
1839 | /* |
1836 | /* |
1840 | * if user used some Esetroot compatible prog to set the root bg, |
1837 | * if user used some Esetroot compatible prog to set the root bg, |
1841 | * use the property to determine the pixmap. We use it later on. |
1838 | * use the property to determine the pixmap. We use it later on. |
1842 | */ |
1839 | */ |
1843 | if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] |
1840 | if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] |
1844 | && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) |
1841 | || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) |
1845 | return; |
1842 | { |
1846 | |
1843 | bgPixmap.set_root_pixmap (); |
1847 | /* FALLTHROUGH */ |
1844 | bgPixmap.render_background (); |
1848 | case ReparentNotify: |
1845 | } |
1849 | if (option (Opt_transparent)) |
|
|
1850 | check_our_parents (); |
|
|
1851 | break; |
1846 | break; |
1852 | } |
1847 | } |
1853 | # endif |
1848 | # endif |
1854 | } |
1849 | } |
1855 | #endif |
1850 | #endif |
… | |
… | |
3435 | break; |
3430 | break; |
3436 | case URxvt_Color_IT: |
3431 | case URxvt_Color_IT: |
3437 | process_color_seq (op, Color_IT, str, resp); |
3432 | process_color_seq (op, Color_IT, str, resp); |
3438 | break; |
3433 | break; |
3439 | #endif |
3434 | #endif |
3440 | #if ENABLE_TRANSPARENCY && TINTING |
3435 | #if ENABLE_TRANSPARENCY |
3441 | case URxvt_Color_tint: |
3436 | case URxvt_Color_tint: |
3442 | process_color_seq (op, Color_tint, str, resp); |
3437 | process_color_seq (op, Color_tint, str, resp); |
3443 | |
|
|
3444 | check_our_parents (); |
|
|
3445 | |
|
|
3446 | if (am_transparent) |
|
|
3447 | want_full_refresh = want_refresh = 1; |
|
|
3448 | |
|
|
3449 | break; |
|
|
3450 | #endif |
|
|
3451 | |
|
|
3452 | case Rxvt_Pixmap: |
|
|
3453 | { |
|
|
3454 | if (*str != ';') |
|
|
3455 | { |
3438 | { |
3456 | #if XPM_BACKGROUND |
|
|
3457 | scale_pixmap (""); /* reset to default scaling */ |
|
|
3458 | set_bgPixmap (str); /* change pixmap */ |
|
|
3459 | scr_touch (true); |
|
|
3460 | #endif |
|
|
3461 | } |
|
|
3462 | |
|
|
3463 | int changed = 0; |
3439 | bool changed = false; |
3464 | |
3440 | if (ISSET_PIXCOLOR (Color_tint)) |
3465 | while ((str = strchr (str, ';')) != NULL) |
3441 | changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); |
3466 | { |
3442 | else |
3467 | str++; |
3443 | changed = bgPixmap.unset_tint (); |
3468 | #if XPM_BACKGROUND |
|
|
3469 | changed += scale_pixmap (str); |
|
|
3470 | #endif |
|
|
3471 | } |
|
|
3472 | |
|
|
3473 | if (changed) |
3444 | if (changed) |
3474 | { |
3445 | { |
3475 | #ifdef XPM_BACKGROUND |
3446 | bgPixmap.render_background (); |
3476 | resize_pixmap (); |
3447 | if (am_transparent) |
3477 | scr_touch (true); |
3448 | want_full_refresh = want_refresh = 1; |
3478 | #endif |
|
|
3479 | } |
3449 | } |
3480 | #if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE) |
3450 | } |
3481 | if (option (Opt_transparent)) |
3451 | |
3482 | check_our_parents (); |
3452 | break; |
3483 | #endif |
3453 | #endif |
|
|
3454 | |
|
|
3455 | #if XPM_BACKGROUND |
|
|
3456 | case Rxvt_Pixmap: |
|
|
3457 | if (!strcmp (str, "?")) |
|
|
3458 | { |
|
|
3459 | char str[256]; |
|
|
3460 | |
|
|
3461 | sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */ |
|
|
3462 | min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767), |
|
|
3463 | min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767)); |
|
|
3464 | process_xterm_seq (XTerm_title, str, CHAR_ST); |
3484 | } |
3465 | } |
|
|
3466 | else |
|
|
3467 | { |
|
|
3468 | int changed = 0; |
|
|
3469 | |
|
|
3470 | if (*str != ';') |
|
|
3471 | { |
|
|
3472 | /* reset to default scaling :*/ |
|
|
3473 | bgPixmap.unset_geometry (); |
|
|
3474 | if (bgPixmap.set_file (str)) /* change pixmap */ |
|
|
3475 | changed++; |
|
|
3476 | str = strchr (str, ';'); |
|
|
3477 | if (str == NULL) |
|
|
3478 | bgPixmap.set_defaultGeometry (); |
|
|
3479 | } |
|
|
3480 | while (str) |
|
|
3481 | { |
|
|
3482 | str++; |
|
|
3483 | if (bgPixmap.set_geometry (str)) |
|
|
3484 | changed++; |
|
|
3485 | str = strchr (str, ';'); |
|
|
3486 | } |
|
|
3487 | if (changed) |
|
|
3488 | { |
|
|
3489 | bgPixmap.render_background (); |
|
|
3490 | scr_touch (true); |
|
|
3491 | } |
|
|
3492 | } |
3485 | break; |
3493 | break; |
|
|
3494 | #endif |
3486 | |
3495 | |
3487 | case Rxvt_restoreFG: |
3496 | case Rxvt_restoreFG: |
3488 | set_window_color (Color_fg, str); |
3497 | set_window_color (Color_fg, str); |
3489 | break; |
3498 | break; |
3490 | case Rxvt_restoreBG: |
3499 | case Rxvt_restoreBG: |