… | |
… | |
919 | #endif /* DEBUG_CMD */ |
919 | #endif /* DEBUG_CMD */ |
920 | tt_write (kbuf, (unsigned int)len); |
920 | tt_write (kbuf, (unsigned int)len); |
921 | } |
921 | } |
922 | /*}}} */ |
922 | /*}}} */ |
923 | |
923 | |
924 | #if MENUBAR_MAX || defined (KEYSYM_RESOURCE) |
924 | #if defined (KEYSYM_RESOURCE) |
925 | /*{{{ rxvt_cmd_write (), rxvt_cmd_getc () */ |
|
|
926 | /* attempt to `write' count to the input buffer */ |
|
|
927 | unsigned int |
925 | unsigned int |
928 | rxvt_term::cmd_write (const char *str, unsigned int count) |
926 | rxvt_term::cmd_write (const char *str, unsigned int count) |
929 | { |
927 | { |
930 | unsigned int n, s; |
928 | unsigned int n, s; |
931 | |
929 | |
… | |
… | |
1587 | if (isScrollbarWindow (ev.xany.window)) |
1585 | if (isScrollbarWindow (ev.xany.window)) |
1588 | { |
1586 | { |
1589 | scrollBar.setIdle (); |
1587 | scrollBar.setIdle (); |
1590 | scrollbar_show (0); |
1588 | scrollbar_show (0); |
1591 | } |
1589 | } |
1592 | #ifdef MENUBAR |
|
|
1593 | if (menubar_visible () && isMenuBarWindow (ev.xany.window)) |
|
|
1594 | menubar_expose (); |
|
|
1595 | #endif |
|
|
1596 | |
1590 | |
1597 | #ifdef TRANSPARENT |
1591 | #ifdef TRANSPARENT |
1598 | if (am_transparent && ev.xany.window == parent[0]) |
1592 | if (am_transparent && ev.xany.window == parent[0]) |
1599 | XClearWindow (disp, ev.xany.window); |
1593 | XClearWindow (disp, ev.xany.window); |
1600 | #endif |
1594 | #endif |
… | |
… | |
1603 | |
1597 | |
1604 | case MotionNotify: |
1598 | case MotionNotify: |
1605 | #ifdef POINTER_BLANK |
1599 | #ifdef POINTER_BLANK |
1606 | if (hidden_pointer) |
1600 | if (hidden_pointer) |
1607 | pointer_unblank (); |
1601 | pointer_unblank (); |
1608 | #endif |
|
|
1609 | #if MENUBAR |
|
|
1610 | if (isMenuBarWindow (ev.xany.window)) |
|
|
1611 | { |
|
|
1612 | menubar_control (ev.xbutton); |
|
|
1613 | break; |
|
|
1614 | } |
|
|
1615 | #endif |
1602 | #endif |
1616 | if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) |
1603 | if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) |
1617 | break; |
1604 | break; |
1618 | |
1605 | |
1619 | if (ev.xany.window == vt) |
1606 | if (ev.xany.window == vt) |
… | |
… | |
2098 | } |
2085 | } |
2099 | } |
2086 | } |
2100 | |
2087 | |
2101 | return; |
2088 | return; |
2102 | } |
2089 | } |
2103 | |
|
|
2104 | #if MENUBAR |
|
|
2105 | /* |
|
|
2106 | * Menubar window processing of button press |
|
|
2107 | */ |
|
|
2108 | if (isMenuBarWindow (ev.window)) |
|
|
2109 | menubar_control (ev); |
|
|
2110 | #endif |
|
|
2111 | } |
2090 | } |
2112 | |
2091 | |
2113 | void |
2092 | void |
2114 | rxvt_term::button_release (XButtonEvent &ev) |
2093 | rxvt_term::button_release (XButtonEvent &ev) |
2115 | { |
2094 | { |
… | |
… | |
2224 | } |
2203 | } |
2225 | break; |
2204 | break; |
2226 | #endif |
2205 | #endif |
2227 | } |
2206 | } |
2228 | } |
2207 | } |
2229 | #ifdef MENUBAR |
|
|
2230 | else if (isMenuBarWindow (ev.window)) |
|
|
2231 | menubar_control (ev); |
|
|
2232 | #endif |
|
|
2233 | } |
2208 | } |
2234 | |
2209 | |
2235 | #ifdef TRANSPARENT |
2210 | #ifdef TRANSPARENT |
2236 | #if TINTING |
2211 | #if TINTING |
2237 | /* taken from aterm-0.4.2 */ |
2212 | /* taken from aterm-0.4.2 */ |
… | |
… | |
3958 | |
3933 | |
3959 | case XTerm_logfile: |
3934 | case XTerm_logfile: |
3960 | // TODO, when secure mode? |
3935 | // TODO, when secure mode? |
3961 | break; |
3936 | break; |
3962 | |
3937 | |
3963 | #ifdef MENUBAR |
|
|
3964 | case URxvt_Menu: |
|
|
3965 | if (OPTION (Opt_insecure)) |
|
|
3966 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
|
|
3967 | break; |
|
|
3968 | #endif |
|
|
3969 | #if 0 |
3938 | #if 0 |
3970 | case Rxvt_dumpscreen: /* no error notices */ |
3939 | case Rxvt_dumpscreen: /* no error notices */ |
3971 | { |
3940 | { |
3972 | int fd; |
3941 | int fd; |
3973 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
3942 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
… | |
… | |
4090 | { 5, PrivMode_rVideo }, |
4059 | { 5, PrivMode_rVideo }, |
4091 | { 6, PrivMode_relOrigin }, |
4060 | { 6, PrivMode_relOrigin }, |
4092 | { 7, PrivMode_Autowrap }, |
4061 | { 7, PrivMode_Autowrap }, |
4093 | // 8, bi-directional support mode |
4062 | // 8, bi-directional support mode |
4094 | { 9, PrivMode_MouseX10 }, |
4063 | { 9, PrivMode_MouseX10 }, |
4095 | #ifdef menuBar_esc |
|
|
4096 | { menuBar_esc, PrivMode_menuBar }, |
|
|
4097 | #endif |
|
|
4098 | // 18, 19 printing-related |
4064 | // 18, 19 printing-related |
4099 | { 25, PrivMode_VisibleCursor }, |
4065 | { 25, PrivMode_VisibleCursor }, |
4100 | #ifdef scrollBar_esc |
4066 | #ifdef scrollBar_esc |
4101 | { scrollBar_esc, PrivMode_scrollBar }, |
4067 | { scrollBar_esc, PrivMode_scrollBar }, |
4102 | #endif |
4068 | #endif |
… | |
… | |
4197 | /* case 8: - auto repeat, can't do on a per window basis */ |
4163 | /* case 8: - auto repeat, can't do on a per window basis */ |
4198 | case 9: /* X10 mouse reporting */ |
4164 | case 9: /* X10 mouse reporting */ |
4199 | if (state) /* orthogonal */ |
4165 | if (state) /* orthogonal */ |
4200 | priv_modes &= ~PrivMode_MouseX11; |
4166 | priv_modes &= ~PrivMode_MouseX11; |
4201 | break; |
4167 | break; |
4202 | #ifdef menuBar_esc |
|
|
4203 | case menuBar_esc: |
|
|
4204 | #ifdef MENUBAR |
|
|
4205 | map_menuBar (state); |
|
|
4206 | #endif |
|
|
4207 | break; |
|
|
4208 | #endif |
|
|
4209 | #ifdef scrollBar_esc |
4168 | #ifdef scrollBar_esc |
4210 | case scrollBar_esc: |
4169 | case scrollBar_esc: |
4211 | if (scrollbar_mapping (state)) |
4170 | if (scrollbar_mapping (state)) |
4212 | { |
4171 | { |
4213 | resize_all_windows (0, 0, 0); |
4172 | resize_all_windows (0, 0, 0); |