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.491 by sf-exg, Fri Aug 19 17:42:09 2011 UTC vs.
Revision 1.496 by sf-exg, Wed Aug 31 22:39:49 2011 UTC

1473 } 1473 }
1474 else 1474 else
1475 { 1475 {
1476#ifdef HAVE_BG_PIXMAP 1476#ifdef HAVE_BG_PIXMAP
1477 if (moved) 1477 if (moved)
1478 {
1479 if (mapped)
1480 update_background (); 1478 update_background ();
1481 else
1482 bg_invalidate ();
1483 }
1484#endif 1479#endif
1485 } 1480 }
1486 1481
1487 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1482 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1488 } 1483 }
1671 XQueryPointer (dpy, scrollBar.win, 1666 XQueryPointer (dpy, scrollBar.win,
1672 &unused_root, &unused_child, 1667 &unused_root, &unused_child,
1673 &unused_root_x, &unused_root_y, 1668 &unused_root_x, &unused_root_y,
1674 &ev.xbutton.x, &ev.xbutton.y, 1669 &ev.xbutton.x, &ev.xbutton.y,
1675 &unused_mask); 1670 &unused_mask);
1676 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, 1671 scr_move_to (scrollBar.position (ev.xbutton.y) - csrO,
1677 scrollBar.size ()); 1672 scrollBar.size ());
1678 want_refresh = 1; 1673 want_refresh = 1;
1679 scrollBar.show (1); 1674 scrollBar.show (1);
1680 } 1675 }
1681 break; 1676 break;
2049 csrO = scrollBar.bot - scrollBar.top; 2044 csrO = scrollBar.bot - scrollBar.top;
2050 break; 2045 break;
2051 } 2046 }
2052 2047
2053 if (scrollBar.style == R_SB_XTERM 2048 if (scrollBar.style == R_SB_XTERM
2054 || scrollbar_above_slider (ev.y) 2049 || scrollBar.above_slider (ev.y)
2055 || scrollbar_below_slider (ev.y)) 2050 || scrollBar.below_slider (ev.y))
2056 scr_move_to (scrollbar_position (ev.y) - csrO, scrollBar.size ()); 2051 scr_move_to (scrollBar.position (ev.y) - csrO, scrollBar.size ());
2057 2052
2058 scrollBar.state = STATE_MOTION; 2053 scrollBar.state = STATE_MOTION;
2059 break; 2054 break;
2060 2055
2061 case Button1: 2056 case Button1:
2064 /* FALLTHROUGH */ 2059 /* FALLTHROUGH */
2065 2060
2066 case Button3: 2061 case Button3:
2067 if (scrollBar.style != R_SB_XTERM) 2062 if (scrollBar.style != R_SB_XTERM)
2068 { 2063 {
2069 if (scrollbar_above_slider (ev.y)) 2064 if (scrollBar.above_slider (ev.y))
2070# ifdef RXVT_SCROLL_FULL 2065# ifdef RXVT_SCROLL_FULL
2071 scr_page (UP, nrow - 1); 2066 scr_page (UP, nrow - 1);
2072# else 2067# else
2073 scr_page (UP, nrow / 4); 2068 scr_page (UP, nrow / 4);
2074# endif 2069# endif
2075 else if (scrollbar_below_slider (ev.y)) 2070 else if (scrollBar.below_slider (ev.y))
2076# ifdef RXVT_SCROLL_FULL 2071# ifdef RXVT_SCROLL_FULL
2077 scr_page (DN, nrow - 1); 2072 scr_page (DN, nrow - 1);
2078# else 2073# else
2079 scr_page (DN, nrow / 4); 2074 scr_page (DN, nrow / 4);
2080# endif 2075# endif
2083 } 2078 }
2084 else 2079 else
2085 { 2080 {
2086 scr_page ((ev.button == Button1 ? DN : UP), 2081 scr_page ((ev.button == Button1 ? DN : UP),
2087 (nrow 2082 (nrow
2088 * scrollbar_position (ev.y) 2083 * scrollBar.position (ev.y)
2089 / scrollBar.size ())); 2084 / scrollBar.size ()));
2090 } 2085 }
2091 2086
2092 break; 2087 break;
2093 } 2088 }
2595 break; 2590 break;
2596 case 'Z': /* identify the terminal type */ 2591 case 'Z': /* identify the terminal type */
2597 tt_printf ("\033/Z"); /* I am a VT100 emulating a VT52 */ 2592 tt_printf ("\033/Z"); /* I am a VT100 emulating a VT52 */
2598 break; 2593 break;
2599 case '<': /* turn off VT52 mode */ 2594 case '<': /* turn off VT52 mode */
2600 set_privmode (PrivMode_vt52, 0); 2595 priv_modes &= ~PrivMode_vt52;
2601 break; 2596 break;
2602 case 'F': /* use special graphics character set */ 2597 case 'F': /* use special graphics character set */
2603 case 'G': /* use regular character set */ 2598 case 'G': /* use regular character set */
2604 /* unimplemented */ 2599 /* unimplemented */
2605 break; 2600 break;
2658 scr_forwardindex (); 2653 scr_forwardindex ();
2659 break; 2654 break;
2660#endif 2655#endif
2661 // DECPAM/DECPNM 2656 // DECPAM/DECPNM
2662 case '=': 2657 case '=':
2658 priv_modes |= PrivMode_aplKP;
2659 break;
2663 case '>': 2660 case '>':
2664 set_privmode (PrivMode_aplKP, ch == '='); 2661 priv_modes &= ~PrivMode_aplKP;
2665 break; 2662 break;
2666 2663
2667 case C1_40: 2664 case C1_40:
2668 cmd_getc (); 2665 cmd_getc ();
2669 break; 2666 break;
3453 min (h_align, 32767), min (v_align, 32767)); 3450 min (h_align, 32767), min (v_align, 32767));
3454 process_xterm_seq (XTerm_title, str, CHAR_ST); 3451 process_xterm_seq (XTerm_title, str, CHAR_ST);
3455 } 3452 }
3456 else 3453 else
3457 { 3454 {
3458 int changed = 0; 3455 bool changed = false;
3459 3456
3460 if (*str != ';') 3457 if (*str != ';')
3461 { 3458 {
3462 if (bg_set_file (str)) /* change pixmap */ 3459 if (bg_set_file (str)) /* change pixmap */
3463 {
3464 changed++; 3460 changed = true;
3465 }
3466 } 3461 }
3467 else 3462 else
3468 { 3463 {
3469 str++; 3464 str++;
3470 if (bg_set_geometry (str, true)) 3465 if (bg_set_geometry (str, true))
3471 changed++; 3466 changed = true;
3472 } 3467 }
3473 3468
3474 if (changed) 3469 if (changed)
3475 { 3470 {
3476 if (bg_window_position_sensitive ()) 3471 if (bg_window_position_sensitive ())
3592 if (mode == 'r') 3587 if (mode == 'r')
3593 state = (SavedModes & bit) ? 1 : 0; /* no overlapping */ 3588 state = (SavedModes & bit) ? 1 : 0; /* no overlapping */
3594 else 3589 else
3595 state = (mode == 't') ? ! (priv_modes & bit) : mode; 3590 state = (mode == 't') ? ! (priv_modes & bit) : mode;
3596 3591
3597 set_privmode (bit, state); 3592 if (state)
3593 priv_modes |= bit;
3594 else
3595 priv_modes &= ~bit;
3598 } 3596 }
3599 3597
3600 return state; 3598 return state;
3601} 3599}
3602 3600
3707 case 2: /* VT52 mode */ 3705 case 2: /* VT52 mode */
3708 /* oddball mode. should be set regardless of set/reset 3706 /* oddball mode. should be set regardless of set/reset
3709 * parameter. Return from VT52 mode with an ESC < from 3707 * parameter. Return from VT52 mode with an ESC < from
3710 * within VT52 mode 3708 * within VT52 mode
3711 */ 3709 */
3712 set_privmode (PrivMode_vt52, 1); 3710 priv_modes |= PrivMode_vt52;
3713 break; 3711 break;
3714 case 3: /* 80/132 */ 3712 case 3: /* 80/132 */
3715 if (priv_modes & PrivMode_132OK) 3713 if (priv_modes & PrivMode_132OK)
3716 set_widthheight ((state ? 132 : 80) * fwidth, 24 * fheight); 3714 set_widthheight ((state ? 132 : 80) * fwidth, 24 * fheight);
3717 break; 3715 break;
3732 if (state) /* orthogonal */ 3730 if (state) /* orthogonal */
3733 priv_modes &= ~(PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); 3731 priv_modes &= ~(PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent);
3734 break; 3732 break;
3735#ifdef scrollBar_esc 3733#ifdef scrollBar_esc
3736 case scrollBar_esc: 3734 case scrollBar_esc:
3737 if (scrollBar.map (state)) 3735 scrollBar.map (state);
3738 {
3739 resize_all_windows (0, 0, 0); 3736 resize_all_windows (0, 0, 0);
3740 scr_touch (true); 3737 scr_touch (true);
3741 }
3742 break; 3738 break;
3743#endif 3739#endif
3744 case 25: /* visible/invisible cursor */ 3740 case 25: /* visible/invisible cursor */
3745 scr_cursor_visible (state); 3741 scr_cursor_visible (state);
3746 break; 3742 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines