… | |
… | |
1311 | dDisp; |
1311 | dDisp; |
1312 | |
1312 | |
1313 | SET_R (this); |
1313 | SET_R (this); |
1314 | SET_LOCALE (locale); |
1314 | SET_LOCALE (locale); |
1315 | |
1315 | |
|
|
1316 | if (ev.xany.window == vt |
|
|
1317 | && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END))) |
|
|
1318 | return; |
|
|
1319 | |
|
|
1320 | // for XQueryPointer |
1316 | Window unused_root, unused_child; |
1321 | Window unused_root, unused_child; |
1317 | int unused_root_x, unused_root_y; |
1322 | int unused_root_x, unused_root_y; |
1318 | unsigned int unused_mask; |
1323 | unsigned int unused_mask; |
1319 | |
1324 | |
1320 | switch (ev.type) |
1325 | switch (ev.type) |
… | |
… | |
1600 | #endif |
1605 | #endif |
1601 | } |
1606 | } |
1602 | break; |
1607 | break; |
1603 | |
1608 | |
1604 | case MotionNotify: |
1609 | case MotionNotify: |
|
|
1610 | printf ("motion notify\n");//D |
1605 | #ifdef POINTER_BLANK |
1611 | #ifdef POINTER_BLANK |
1606 | if (hidden_pointer) |
1612 | if (hidden_pointer) |
1607 | pointer_unblank (); |
1613 | pointer_unblank (); |
1608 | #endif |
1614 | #endif |
1609 | #if MENUBAR |
1615 | #if MENUBAR |
… | |
… | |
1920 | #else |
1926 | #else |
1921 | selection.rect = false; |
1927 | selection.rect = false; |
1922 | #endif |
1928 | #endif |
1923 | |
1929 | |
1924 | /* allow shift+left click to extend selection */ |
1930 | /* allow shift+left click to extend selection */ |
1925 | if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report)) |
1931 | if (ev.state & ShiftMask && !(priv_modes & PrivMode_mouse_report)) |
1926 | { |
1932 | { |
1927 | if (MEvent.button == Button1 && clickintime) |
1933 | if (MEvent.button == Button1 && clickintime) |
1928 | selection_rotate (ev.x, ev.y); |
1934 | selection_rotate (ev.x, ev.y); |
1929 | else |
1935 | else |
1930 | selection_extend (ev.x, ev.y, 1); |
1936 | selection_extend (ev.x, ev.y, 1); |
… | |
… | |
3860 | break; |
3866 | break; |
3861 | |
3867 | |
3862 | *name++ = '\0'; |
3868 | *name++ = '\0'; |
3863 | color = atoi (buf) + minCOLOR; |
3869 | color = atoi (buf) + minCOLOR; |
3864 | |
3870 | |
3865 | if (!IN_RANGE_EXC (color, minCOLOR, TOTAL_COLORS)) |
3871 | if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR)) |
3866 | break; |
3872 | break; |
3867 | |
3873 | |
3868 | if ((buf = strchr (name, ';')) != NULL) |
3874 | if ((buf = strchr (name, ';')) != NULL) |
3869 | *buf++ = '\0'; |
3875 | *buf++ = '\0'; |
3870 | |
3876 | |
… | |
… | |
3894 | break; |
3900 | break; |
3895 | case XTerm_Color_pointer_bg: |
3901 | case XTerm_Color_pointer_bg: |
3896 | process_color_seq (XTerm_Color_pointer_bg, Color_pointer_bg, str, resp); |
3902 | process_color_seq (XTerm_Color_pointer_bg, Color_pointer_bg, str, resp); |
3897 | break; |
3903 | break; |
3898 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3904 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3899 | case XTerm_Color_BD: |
|
|
3900 | process_color_seq (XTerm_Color_BD, Color_BD, str, resp); |
|
|
3901 | break; |
|
|
3902 | case XTerm_Color_UL: |
|
|
3903 | process_color_seq (XTerm_Color_UL, Color_UL, str, resp); |
|
|
3904 | break; |
|
|
3905 | case XTerm_Color_RV: |
3905 | case XTerm_Color_RV: |
3906 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
3906 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
|
|
3907 | break; |
|
|
3908 | case Rxvt_Color_BD: |
|
|
3909 | case URxvt_Color_BD: |
|
|
3910 | process_color_seq (op, Color_BD, str, resp); |
|
|
3911 | break; |
|
|
3912 | case Rxvt_Color_UL: |
|
|
3913 | case URxvt_Color_UL: |
|
|
3914 | process_color_seq (op, Color_UL, str, resp); |
3907 | break; |
3915 | break; |
3908 | case URxvt_Color_IT: |
3916 | case URxvt_Color_IT: |
3909 | process_color_seq (URxvt_Color_IT, Color_IT, str, resp); |
3917 | process_color_seq (URxvt_Color_IT, Color_IT, str, resp); |
3910 | break; |
3918 | break; |
3911 | #endif |
3919 | #endif |
… | |
… | |
3916 | if (am_transparent) |
3924 | if (am_transparent) |
3917 | want_full_refresh = want_refresh = 1; |
3925 | want_full_refresh = want_refresh = 1; |
3918 | break; |
3926 | break; |
3919 | #endif |
3927 | #endif |
3920 | |
3928 | |
3921 | case XTerm_Pixmap: |
3929 | case Rxvt_Pixmap: |
3922 | if (*str != ';') |
3930 | if (*str != ';') |
3923 | { |
3931 | { |
3924 | #if XPM_BACKGROUND |
3932 | #if XPM_BACKGROUND |
3925 | scale_pixmap (""); /* reset to default scaling */ |
3933 | scale_pixmap (""); /* reset to default scaling */ |
3926 | set_bgPixmap (str); /* change pixmap */ |
3934 | set_bgPixmap (str); /* change pixmap */ |
… | |
… | |
3943 | scr_touch (true); |
3951 | scr_touch (true); |
3944 | #endif |
3952 | #endif |
3945 | } |
3953 | } |
3946 | break; |
3954 | break; |
3947 | |
3955 | |
3948 | case XTerm_restoreFG: |
3956 | case Rxvt_restoreFG: |
3949 | set_window_color (Color_fg, str); |
3957 | set_window_color (Color_fg, str); |
3950 | break; |
3958 | break; |
3951 | case XTerm_restoreBG: |
3959 | case Rxvt_restoreBG: |
3952 | set_window_color (Color_bg, str); |
3960 | set_window_color (Color_bg, str); |
3953 | break; |
3961 | break; |
3954 | |
3962 | |
3955 | case XTerm_logfile: |
3963 | case XTerm_logfile: |
3956 | // TODO, when secure mode? |
3964 | // TODO, when secure mode? |
… | |
… | |
3961 | if (OPTION (Opt_insecure)) |
3969 | if (OPTION (Opt_insecure)) |
3962 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
3970 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
3963 | break; |
3971 | break; |
3964 | #endif |
3972 | #endif |
3965 | #if 0 |
3973 | #if 0 |
3966 | case XTerm_dumpscreen: /* no error notices */ |
3974 | case Rxvt_dumpscreen: /* no error notices */ |
3967 | { |
3975 | { |
3968 | int fd; |
3976 | int fd; |
3969 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
3977 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
3970 | { |
3978 | { |
3971 | scr_dump (fd); |
3979 | scr_dump (fd); |