ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.481 by root, Thu Mar 24 17:34:28 2011 UTC vs.
Revision 1.483 by sf-exg, Tue Apr 26 16:19:45 2011 UTC

1445 && ev.xfocus.mode != NotifyGrab) 1445 && ev.xfocus.mode != NotifyGrab)
1446 focus_out (); 1446 focus_out ();
1447 break; 1447 break;
1448 1448
1449 case ConfigureNotify: 1449 case ConfigureNotify:
1450 if (ev.xconfigure.window == parent[0]) 1450 if (ev.xconfigure.window == parent)
1451 { 1451 {
1452 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) 1452 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev))
1453 ; 1453 ;
1454 1454
1455#ifdef HAVE_BG_PIXMAP 1455#ifdef HAVE_BG_PIXMAP
1721rxvt_term::set_urgency (bool enable) 1721rxvt_term::set_urgency (bool enable)
1722{ 1722{
1723 if (enable == urgency_hint) 1723 if (enable == urgency_hint)
1724 return; 1724 return;
1725 1725
1726 if (XWMHints *h = XGetWMHints (dpy, parent[0])) 1726 if (XWMHints *h = XGetWMHints (dpy, parent))
1727 { 1727 {
1728 h->flags = h->flags & ~XUrgencyHint | (enable ? XUrgencyHint : 0); 1728 h->flags = h->flags & ~XUrgencyHint | (enable ? XUrgencyHint : 0);
1729 XSetWMHints (dpy, parent[0], h); 1729 XSetWMHints (dpy, parent, h);
1730 urgency_hint = enable; 1730 urgency_hint = enable;
1731 } 1731 }
1732} 1732}
1733#endif 1733#endif
1734 1734
2389 : NOCHAR; 2389 : NOCHAR;
2390} 2390}
2391 2391
2392static class out_of_input out_of_input; 2392static class out_of_input out_of_input;
2393 2393
2394/* rxvt_cmd_getc () - Return next input character */
2395/*
2396 * Return the next input character after first passing any keyboard input
2397 * to the command.
2398 */
2399wchar_t 2394wchar_t
2400rxvt_term::cmd_getc () THROW ((class out_of_input)) 2395rxvt_term::cmd_getc () THROW ((class out_of_input))
2401{ 2396{
2402 wchar_t c = next_char (); 2397 wchar_t c = next_char ();
2403 2398
3122 { 3117 {
3123 /* 3118 /*
3124 * commands 3119 * commands
3125 */ 3120 */
3126 case 1: /* deiconify window */ 3121 case 1: /* deiconify window */
3127 XMapWindow (dpy, parent[0]); 3122 XMapWindow (dpy, parent);
3128 break; 3123 break;
3129 case 2: /* iconify window */ 3124 case 2: /* iconify window */
3130 XIconifyWindow (dpy, parent[0], display->screen); 3125 XIconifyWindow (dpy, parent, display->screen);
3131 break; 3126 break;
3132 case 3: /* set position (pixels) */ 3127 case 3: /* set position (pixels) */
3133 XMoveWindow (dpy, parent[0], args[1], args[2]); 3128 XMoveWindow (dpy, parent, args[1], args[2]);
3134 break; 3129 break;
3135 case 4: /* set size (pixels) */ 3130 case 4: /* set size (pixels) */
3136 set_widthheight ((unsigned int)args[2], (unsigned int)args[1]); 3131 set_widthheight ((unsigned int)args[2], (unsigned int)args[1]);
3137 break; 3132 break;
3138 case 5: /* raise window */ 3133 case 5: /* raise window */
3139 XRaiseWindow (dpy, parent[0]); 3134 XRaiseWindow (dpy, parent);
3140 break; 3135 break;
3141 case 6: /* lower window */ 3136 case 6: /* lower window */
3142 XLowerWindow (dpy, parent[0]); 3137 XLowerWindow (dpy, parent);
3143 break; 3138 break;
3144 case 7: /* refresh window */ 3139 case 7: /* refresh window */
3145 scr_touch (true); 3140 scr_touch (true);
3146 break; 3141 break;
3147 case 8: /* set size (chars) */ 3142 case 8: /* set size (chars) */
3158 3153
3159 /* 3154 /*
3160 * reports - some output format copied from XTerm 3155 * reports - some output format copied from XTerm
3161 */ 3156 */
3162 case 11: /* report window state */ 3157 case 11: /* report window state */
3163 XGetWindowAttributes (dpy, parent[0], &wattr); 3158 XGetWindowAttributes (dpy, parent, &wattr);
3164 tt_printf ("\033[%dt", wattr.map_state == IsViewable ? 1 : 2); 3159 tt_printf ("\033[%dt", wattr.map_state == IsViewable ? 1 : 2);
3165 break; 3160 break;
3166 case 13: /* report window position */ 3161 case 13: /* report window position */
3167 XGetWindowAttributes (dpy, parent[0], &wattr); 3162 XGetWindowAttributes (dpy, parent, &wattr);
3168 XTranslateCoordinates (dpy, parent[0], wattr.root, 3163 XTranslateCoordinates (dpy, parent, wattr.root,
3169 -wattr.border_width, -wattr.border_width, 3164 -wattr.border_width, -wattr.border_width,
3170 &x, &y, &wdummy); 3165 &x, &y, &wdummy);
3171 tt_printf ("\033[3;%d;%dt", x, y); 3166 tt_printf ("\033[3;%d;%dt", x, y);
3172 break; 3167 break;
3173 case 14: /* report window size (pixels) */ 3168 case 14: /* report window size (pixels) */
3174 XGetWindowAttributes (dpy, parent[0], &wattr); 3169 XGetWindowAttributes (dpy, parent, &wattr);
3175 tt_printf ("\033[4;%d;%dt", wattr.height, wattr.width); 3170 tt_printf ("\033[4;%d;%dt", wattr.height, wattr.width);
3176 break; 3171 break;
3177 case 18: /* report text area size (chars) */ 3172 case 18: /* report text area size (chars) */
3178 tt_printf ("\033[8;%d;%dt", nrow, ncol); 3173 tt_printf ("\033[8;%d;%dt", nrow, ncol);
3179 break; 3174 break;
3181 tt_printf ("\033[9;%d;%dt", nrow, ncol); 3176 tt_printf ("\033[9;%d;%dt", nrow, ncol);
3182 break; 3177 break;
3183 case 20: /* report icon label */ 3178 case 20: /* report icon label */
3184 { 3179 {
3185 char *s; 3180 char *s;
3186 XGetIconName (dpy, parent[0], &s); 3181 XGetIconName (dpy, parent, &s);
3187 tt_printf ("\033]L%-.250s\234", option (Opt_insecure) && s ? s : ""); /* 8bit ST */ 3182 tt_printf ("\033]L%-.250s\234", option (Opt_insecure) && s ? s : ""); /* 8bit ST */
3188 XFree (s); 3183 XFree (s);
3189 } 3184 }
3190 break; 3185 break;
3191 case 21: /* report window title */ 3186 case 21: /* report window title */
3192 { 3187 {
3193 char *s; 3188 char *s;
3194 XFetchName (dpy, parent[0], &s); 3189 XFetchName (dpy, parent, &s);
3195 tt_printf ("\033]l%-.250s\234", option (Opt_insecure) && s ? s : ""); /* 8bit ST */ 3190 tt_printf ("\033]l%-.250s\234", option (Opt_insecure) && s ? s : ""); /* 8bit ST */
3196 XFree (s); 3191 XFree (s);
3197 } 3192 }
3198 break; 3193 break;
3199 } 3194 }
3353 unsigned long bytes_after; 3348 unsigned long bytes_after;
3354 unsigned char *value = 0; 3349 unsigned char *value = 0;
3355 const char *str = ""; 3350 const char *str = "";
3356 3351
3357 if (prop 3352 if (prop
3358 && XGetWindowProperty (dpy, parent[0], 3353 && XGetWindowProperty (dpy, parent,
3359 prop, 0, 1<<16, 0, AnyPropertyType, 3354 prop, 0, 1<<16, 0, AnyPropertyType,
3360 &actual_type, &actual_format, 3355 &actual_type, &actual_format,
3361 &nitems, &bytes_after, &value) == Success 3356 &nitems, &bytes_after, &value) == Success
3362 && actual_type != None 3357 && actual_type != None
3363 && actual_format == 8) 3358 && actual_format == 8)
3375 { 3370 {
3376 *eq = 0; 3371 *eq = 0;
3377 set_utf8_property (display->atom (str), eq + 1); 3372 set_utf8_property (display->atom (str), eq + 1);
3378 } 3373 }
3379 else 3374 else
3380 XDeleteProperty (dpy, parent[0], 3375 XDeleteProperty (dpy, parent,
3381 display->atom (str)); 3376 display->atom (str));
3382 } 3377 }
3383 break; 3378 break;
3384 3379
3385 case XTerm_Color: 3380 case XTerm_Color:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines