… | |
… | |
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. |
… | |
… | |
198 | r & RS_Uline ? " uline" : "", |
199 | r & RS_Uline ? " uline" : "", |
199 | r & RS_Careful ? " careful" : ""); |
200 | r & RS_Careful ? " careful" : ""); |
200 | |
201 | |
201 | int width = wcswidth (fname, wcslen (fname)); |
202 | int width = wcswidth (fname, wcslen (fname)); |
202 | |
203 | |
203 | max_it (width, 8+5); // for char + hey |
204 | max_it (width, 8+5); // for char + hex |
204 | max_it (width, strlen (attr)); |
205 | max_it (width, strlen (attr)); |
205 | |
206 | |
206 | if (y >= 0) |
207 | if (y >= 0) |
207 | { |
208 | { |
208 | y = (y >= nrow - len - 4 && x < width + 2) ? 0 : -1; |
209 | y = (y >= nrow - len - 4 && x < width + 2) ? 0 : -1; |
… | |
… | |
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 | |
… | |
… | |
1211 | if (cmd_parse ()) |
1212 | if (cmd_parse ()) |
1212 | break; |
1213 | break; |
1213 | |
1214 | |
1214 | if (revents & ev::WRITE) |
1215 | if (revents & ev::WRITE) |
1215 | pty_write (); |
1216 | pty_write (); |
|
|
1217 | |
|
|
1218 | refresh_check (); |
1216 | } |
1219 | } |
1217 | |
1220 | |
1218 | void |
1221 | void |
1219 | rxvt_term::pointer_unblank () |
1222 | rxvt_term::pointer_unblank () |
1220 | { |
1223 | { |
… | |
… | |
1455 | #ifdef HAVE_BG_PIXMAP |
1458 | #ifdef HAVE_BG_PIXMAP |
1456 | if (bgPixmap.window_position_sensitive ()) |
1459 | if (bgPixmap.window_position_sensitive ()) |
1457 | update_background (); |
1460 | update_background (); |
1458 | #endif |
1461 | #endif |
1459 | } |
1462 | } |
|
|
1463 | |
1460 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1464 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1461 | } |
1465 | } |
1462 | break; |
1466 | break; |
1463 | |
1467 | |
1464 | case PropertyNotify: |
1468 | case PropertyNotify: |
… | |
… | |
1526 | while (XCheckTypedWindowEvent (dpy, ev.xany.window, Expose, &unused_event)) |
1530 | while (XCheckTypedWindowEvent (dpy, ev.xany.window, Expose, &unused_event)) |
1527 | ; |
1531 | ; |
1528 | while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event)) |
1532 | while (XCheckTypedWindowEvent (dpy, ev.xany.window, GraphicsExpose, &unused_event)) |
1529 | ; |
1533 | ; |
1530 | |
1534 | |
1531 | if (isScrollbarWindow (ev.xany.window)) |
1535 | if (scrollBar.state && ev.xany.window == scrollBar.win) |
1532 | { |
1536 | { |
1533 | scrollBar.setIdle (); |
1537 | scrollBar.setIdle (); |
1534 | scrollbar_show (0); |
1538 | scrollbar_show (0); |
1535 | } |
1539 | } |
1536 | } |
1540 | } |
… | |
… | |
1626 | #ifdef MOUSE_THRESHOLD |
1630 | #ifdef MOUSE_THRESHOLD |
1627 | } |
1631 | } |
1628 | #endif |
1632 | #endif |
1629 | } |
1633 | } |
1630 | } |
1634 | } |
1631 | else if (isScrollbarWindow (ev.xany.window) && scrollbar_isMotion ()) |
1635 | else if (scrollbar_isMotion () && ev.xany.window == scrollBar.win) |
1632 | { |
1636 | { |
1633 | while (XCheckTypedWindowEvent (dpy, scrollBar.win, |
1637 | while (XCheckTypedWindowEvent (dpy, scrollBar.win, |
1634 | MotionNotify, &ev)) |
1638 | MotionNotify, &ev)) |
1635 | ; |
1639 | ; |
1636 | |
1640 | |
… | |
… | |
1792 | || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) |
1796 | || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) |
1793 | { |
1797 | { |
1794 | bgPixmap.set_root_pixmap (); |
1798 | bgPixmap.set_root_pixmap (); |
1795 | update_background (); |
1799 | update_background (); |
1796 | } |
1800 | } |
|
|
1801 | |
1797 | break; |
1802 | break; |
1798 | } |
1803 | } |
1799 | # endif |
1804 | # endif |
1800 | |
1805 | |
1801 | refresh_check (); |
1806 | refresh_check (); |
… | |
… | |
1919 | } |
1924 | } |
1920 | |
1925 | |
1921 | /* |
1926 | /* |
1922 | * Scrollbar window processing of button press |
1927 | * Scrollbar window processing of button press |
1923 | */ |
1928 | */ |
1924 | if (isScrollbarWindow (ev.window)) |
1929 | if (scrollBar.state && ev.window == scrollBar.win) |
1925 | { |
1930 | { |
1926 | scrollBar.setIdle (); |
1931 | scrollBar.setIdle (); |
1927 | /* |
1932 | /* |
1928 | * Rxvt-style scrollbar: |
1933 | * Rxvt-style scrollbar: |
1929 | * move up if mouse is above slider |
1934 | * move up if mouse is above slider |
… | |
… | |
2003 | } |
2008 | } |
2004 | else |
2009 | else |
2005 | switch (ev.button) |
2010 | switch (ev.button) |
2006 | { |
2011 | { |
2007 | case Button2: |
2012 | case Button2: |
2008 | switch (scrollbar_align) |
2013 | switch (scrollBar.align) |
2009 | { |
2014 | { |
2010 | case R_SB_ALIGN_TOP: |
2015 | case R_SB_ALIGN_TOP: |
2011 | csrO = 0; |
2016 | csrO = 0; |
2012 | break; |
2017 | break; |
2013 | case R_SB_ALIGN_CENTRE: |
2018 | case R_SB_ALIGN_CENTRE: |
… | |
… | |
2025 | |
2030 | |
2026 | scrollBar.setMotion (); |
2031 | scrollBar.setMotion (); |
2027 | break; |
2032 | break; |
2028 | |
2033 | |
2029 | case Button1: |
2034 | case Button1: |
2030 | if (scrollbar_align == R_SB_ALIGN_CENTRE) |
2035 | if (scrollBar.align == R_SB_ALIGN_CENTRE) |
2031 | csrO = ev.y - scrollBar.top; |
2036 | csrO = ev.y - scrollBar.top; |
2032 | /* FALLTHROUGH */ |
2037 | /* FALLTHROUGH */ |
2033 | |
2038 | |
2034 | case Button3: |
2039 | case Button3: |
2035 | if (scrollBar.style != R_SB_XTERM) |
2040 | if (scrollBar.style != R_SB_XTERM) |
… | |
… | |
2311 | |
2316 | |
2312 | ch = NOCHAR; |
2317 | ch = NOCHAR; |
2313 | } |
2318 | } |
2314 | } |
2319 | } |
2315 | |
2320 | |
2316 | refresh_check (); |
|
|
2317 | |
|
|
2318 | return flag; |
2321 | return flag; |
2319 | } |
2322 | } |
2320 | |
2323 | |
2321 | // read the next character |
2324 | // read the next character |
2322 | wchar_t |
2325 | wchar_t |
… | |
… | |
3389 | #if ENABLE_TRANSPARENCY |
3392 | #if ENABLE_TRANSPARENCY |
3390 | case URxvt_Color_tint: |
3393 | case URxvt_Color_tint: |
3391 | process_color_seq (op, Color_tint, str, resp); |
3394 | process_color_seq (op, Color_tint, str, resp); |
3392 | { |
3395 | { |
3393 | bool changed = false; |
3396 | bool changed = false; |
|
|
3397 | |
3394 | if (ISSET_PIXCOLOR (Color_tint)) |
3398 | if (ISSET_PIXCOLOR (Color_tint)) |
3395 | changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); |
3399 | changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); |
3396 | else |
3400 | else |
3397 | changed = bgPixmap.unset_tint (); |
3401 | changed = bgPixmap.unset_tint (); |
|
|
3402 | |
3398 | if (changed) |
3403 | if (changed) |
3399 | update_background (); |
3404 | update_background (); |
3400 | } |
3405 | } |
3401 | |
3406 | |
3402 | break; |
3407 | break; |
… | |
… | |
3425 | changed++; |
3430 | changed++; |
3426 | str = strchr (str, ';'); |
3431 | str = strchr (str, ';'); |
3427 | if (str == NULL) |
3432 | if (str == NULL) |
3428 | bgPixmap.set_defaultGeometry (); |
3433 | bgPixmap.set_defaultGeometry (); |
3429 | } |
3434 | } |
|
|
3435 | |
3430 | while (str) |
3436 | while (str) |
3431 | { |
3437 | { |
3432 | str++; |
3438 | str++; |
3433 | if (bgPixmap.set_geometry (str)) |
3439 | if (bgPixmap.set_geometry (str)) |
3434 | changed++; |
3440 | changed++; |
3435 | str = strchr (str, ';'); |
3441 | str = strchr (str, ';'); |
3436 | } |
3442 | } |
|
|
3443 | |
3437 | if (changed) |
3444 | if (changed) |
3438 | update_background (); |
3445 | update_background (); |
3439 | } |
3446 | } |
3440 | break; |
3447 | break; |
3441 | #endif |
3448 | #endif |
3442 | |
3449 | |
3443 | case Rxvt_restoreFG: |
3450 | case Rxvt_restoreFG: |