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.384 by ayin, Tue Dec 18 13:07:55 2007 UTC vs.
Revision 1.391 by root, Wed Jan 9 01:14:29 2008 UTC

26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> 26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
27 * Copyright (c) 2001 Marius Gedminas 27 * Copyright (c) 2001 Marius Gedminas
28 * - Ctrl/Mod4+Tab works like Meta+Tab (options) 28 * - Ctrl/Mod4+Tab works like Meta+Tab (options)
29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> 29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org>
30 * Copyright (c) 2003-2007 Marc Lehmann <pcg@goof.com> 30 * Copyright (c) 2003-2007 Marc Lehmann <pcg@goof.com>
31 * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it>
31 * 32 *
32 * This program is free software; you can redistribute it and/or modify 33 * This program is free software; you can redistribute it and/or modify
33 * it under the terms of the GNU General Public License as published by 34 * it under the terms of the GNU General Public License as published by
34 * the Free Software Foundation; either version 2 of the License, or 35 * the Free Software Foundation; either version 2 of the License, or
35 * (at your option) any later version. 36 * (at your option) any later version.
220 ch = *chr++; 221 ch = *chr++;
221 222
222 sprintf (buf, "%8x", ch); 223 sprintf (buf, "%8x", ch);
223 scr_overlay_set (0, y, buf); 224 scr_overlay_set (0, y, buf);
224 scr_overlay_set (9, y, '='); 225 scr_overlay_set (9, y, '=');
225# if !UNICODE3 226# if !UNICODE_3
226 if (ch >= 0x10000) 227 if (ch >= 0x10000)
227 ch = 0xfffd; 228 ch = 0xfffd;
228# endif 229# endif
229 scr_overlay_set (11, y, ch, r); 230 scr_overlay_set (11, y, ch, r);
230 231
1457#ifdef HAVE_BG_PIXMAP 1458#ifdef HAVE_BG_PIXMAP
1458 if (bgPixmap.window_position_sensitive ()) 1459 if (bgPixmap.window_position_sensitive ())
1459 update_background (); 1460 update_background ();
1460#endif 1461#endif
1461 } 1462 }
1463
1462 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1464 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1463 } 1465 }
1464 break; 1466 break;
1465 1467
1466 case PropertyNotify: 1468 case PropertyNotify:
1528 while (XCheckTypedWindowEvent (dpy, ev.xany.window, Expose, &unused_event)) 1530 while (XCheckTypedWindowEvent (dpy, ev.xany.window, Expose, &unused_event))
1529 ; 1531 ;
1530 while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event)) 1532 while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event))
1531 ; 1533 ;
1532 1534
1533 if (isScrollbarWindow (ev.xany.window)) 1535 if (scrollBar.state && ev.xany.window == scrollBar.win)
1534 { 1536 {
1535 scrollBar.setIdle (); 1537 scrollBar.setIdle ();
1536 scrollbar_show (0); 1538 scrollbar_show (0);
1537 } 1539 }
1538 } 1540 }
1628#ifdef MOUSE_THRESHOLD 1630#ifdef MOUSE_THRESHOLD
1629 } 1631 }
1630#endif 1632#endif
1631 } 1633 }
1632 } 1634 }
1633 else if (isScrollbarWindow (ev.xany.window) && scrollbar_isMotion ()) 1635 else if (scrollbar_isMotion () && ev.xany.window == scrollBar.win)
1634 { 1636 {
1635 while (XCheckTypedWindowEvent (dpy, scrollBar.win, 1637 while (XCheckTypedWindowEvent (dpy, scrollBar.win,
1636 MotionNotify, &ev)) 1638 MotionNotify, &ev))
1637 ; 1639 ;
1638 1640
1794 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) 1796 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1795 { 1797 {
1796 bgPixmap.set_root_pixmap (); 1798 bgPixmap.set_root_pixmap ();
1797 update_background (); 1799 update_background ();
1798 } 1800 }
1801
1799 break; 1802 break;
1800 } 1803 }
1801# endif 1804# endif
1802 1805
1803 refresh_check (); 1806 refresh_check ();
1921 } 1924 }
1922 1925
1923 /* 1926 /*
1924 * Scrollbar window processing of button press 1927 * Scrollbar window processing of button press
1925 */ 1928 */
1926 if (isScrollbarWindow (ev.window)) 1929 if (scrollBar.state && ev.window == scrollBar.win)
1927 { 1930 {
1928 scrollBar.setIdle (); 1931 scrollBar.setIdle ();
1929 /* 1932 /*
1930 * Rxvt-style scrollbar: 1933 * Rxvt-style scrollbar:
1931 * move up if mouse is above slider 1934 * move up if mouse is above slider
2005 } 2008 }
2006 else 2009 else
2007 switch (ev.button) 2010 switch (ev.button)
2008 { 2011 {
2009 case Button2: 2012 case Button2:
2010 switch (scrollbar_align) 2013 switch (scrollBar.align)
2011 { 2014 {
2012 case R_SB_ALIGN_TOP: 2015 case R_SB_ALIGN_TOP:
2013 csrO = 0; 2016 csrO = 0;
2014 break; 2017 break;
2015 case R_SB_ALIGN_CENTRE: 2018 case R_SB_ALIGN_CENTRE:
2027 2030
2028 scrollBar.setMotion (); 2031 scrollBar.setMotion ();
2029 break; 2032 break;
2030 2033
2031 case Button1: 2034 case Button1:
2032 if (scrollbar_align == R_SB_ALIGN_CENTRE) 2035 if (scrollBar.align == R_SB_ALIGN_CENTRE)
2033 csrO = ev.y - scrollBar.top; 2036 csrO = ev.y - scrollBar.top;
2034 /* FALLTHROUGH */ 2037 /* FALLTHROUGH */
2035 2038
2036 case Button3: 2039 case Button3:
2037 if (scrollBar.style != R_SB_XTERM) 2040 if (scrollBar.style != R_SB_XTERM)
2167 2170
2168 if (!slip_wheel_ev.is_active ()) 2171 if (!slip_wheel_ev.is_active ())
2169 slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 2172 slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
2170 } 2173 }
2171 else 2174 else
2175# endif
2172 { 2176 {
2173# endif
2174 scr_page (v, i); 2177 scr_page (v, i);
2175 scrollbar_show (1); 2178 scrollbar_show (1);
2176# ifdef MOUSE_SLIP_WHEELING
2177 } 2179 }
2178# endif
2179 } 2180 }
2180 break; 2181 break;
2181#endif 2182#endif
2182 } 2183 }
2183 } 2184 }
3389#if ENABLE_TRANSPARENCY 3390#if ENABLE_TRANSPARENCY
3390 case URxvt_Color_tint: 3391 case URxvt_Color_tint:
3391 process_color_seq (op, Color_tint, str, resp); 3392 process_color_seq (op, Color_tint, str, resp);
3392 { 3393 {
3393 bool changed = false; 3394 bool changed = false;
3395
3394 if (ISSET_PIXCOLOR (Color_tint)) 3396 if (ISSET_PIXCOLOR (Color_tint))
3395 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); 3397 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
3396 else 3398 else
3397 changed = bgPixmap.unset_tint (); 3399 changed = bgPixmap.unset_tint ();
3400
3398 if (changed) 3401 if (changed)
3399 update_background (); 3402 update_background ();
3400 } 3403 }
3401 3404
3402 break; 3405 break;
3425 changed++; 3428 changed++;
3426 str = strchr (str, ';'); 3429 str = strchr (str, ';');
3427 if (str == NULL) 3430 if (str == NULL)
3428 bgPixmap.set_defaultGeometry (); 3431 bgPixmap.set_defaultGeometry ();
3429 } 3432 }
3433
3430 while (str) 3434 while (str)
3431 { 3435 {
3432 str++; 3436 str++;
3433 if (bgPixmap.set_geometry (str)) 3437 if (bgPixmap.set_geometry (str))
3434 changed++; 3438 changed++;
3435 str = strchr (str, ';'); 3439 str = strchr (str, ';');
3436 } 3440 }
3441
3437 if (changed) 3442 if (changed)
3438 update_background (); 3443 update_background ();
3439 } 3444 }
3440 break; 3445 break;
3441#endif 3446#endif
3442 3447
3443 case Rxvt_restoreFG: 3448 case Rxvt_restoreFG:
3665 */ 3670 */
3666 PrivMode (1, PrivMode_vt52); 3671 PrivMode (1, PrivMode_vt52);
3667 break; 3672 break;
3668 case 3: /* 80/132 */ 3673 case 3: /* 80/132 */
3669 if (priv_modes & PrivMode_132OK) 3674 if (priv_modes & PrivMode_132OK)
3675 {
3676 scr_poweron ();
3670 set_widthheight (((state ? 132 : 80) * fwidth), height); 3677 set_widthheight (((state ? 132 : 80) * fwidth), 24 * fheight);
3678 }
3671 break; 3679 break;
3672 case 4: /* smooth scrolling */ 3680 case 4: /* smooth scrolling */
3673 set_option (Opt_jumpScroll, !state); 3681 set_option (Opt_jumpScroll, !state);
3674 break; 3682 break;
3675 case 5: /* reverse video */ 3683 case 5: /* reverse video */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines