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.541 by root, Thu Feb 20 18:59:13 2014 UTC vs.
Revision 1.543 by sf-exg, Sat Apr 26 14:07:36 2014 UTC

25 * - extensive modifications 25 * - extensive modifications
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-2011 Marc Lehmann <schmorp@schmorp.de> 30 * Copyright (c) 2003-2014 Marc Lehmann <schmorp@schmorp.de>
31 * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it> 31 * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it>
32 * 32 *
33 * 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
34 * 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
35 * the Free Software Foundation; either version 2 of the License, or 35 * the Free Software Foundation; either version 2 of the License, or
398 case XK_Menu: 398 case XK_Menu:
399 param = 29; 399 param = 29;
400 break; 400 break;
401 } 401 }
402 return param; 402 return param;
403}
404
405static inline wchar_t *
406rxvt_wcsdup (const wchar_t *str, int len)
407{
408 wchar_t *r = (wchar_t *)rxvt_malloc ((len + 1) * sizeof (wchar_t));
409 memcpy (r, str, len * sizeof (wchar_t));
410 r[len] = 0;
411 return r;
403} 412}
404 413
405void ecb_cold 414void ecb_cold
406rxvt_term::key_press (XKeyEvent &ev) 415rxvt_term::key_press (XKeyEvent &ev)
407{ 416{
576 case XK_KP_Subtract: /* Shift+KP_Subtract = smaller font */ 585 case XK_KP_Subtract: /* Shift+KP_Subtract = smaller font */
577 return; 586 return;
578#endif 587#endif
579 } 588 }
580 } 589 }
590 }
591
592 if (ctrl && meta && (keysym == XK_c || keysym == XK_v))
593 {
594 if (keysym == XK_v)
595 selection_request (ev.time, Sel_Clipboard);
596 else if (selection.len > 0)
597 {
598 free (selection.clip_text);
599 selection.clip_text = rxvt_wcsdup (selection.text, selection.len);
600 selection.clip_len = selection.len;
601 selection_grab (CurrentTime, true);
602 }
603
604 return;
581 } 605 }
582 606
583#if ENABLE_FRILLS || ISO_14755 607#if ENABLE_FRILLS || ISO_14755
584 // ISO 14755 support 608 // ISO 14755 support
585 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_51)) 609 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_51))
3379 &nitems, &bytes_after, &value) == Success 3403 &nitems, &bytes_after, &value) == Success
3380 && actual_type != None 3404 && actual_type != None
3381 && actual_format == 8) 3405 && actual_format == 8)
3382 str = (const char *)(value); 3406 str = (const char *)(value);
3383 3407
3384 tt_printf ("\033]%d;%s%c", op, str, resp); 3408 tt_printf ("\033]%d;%s%c", op, option (Opt_insecure) ? str : "", resp);
3385 3409
3386 XFree (value); 3410 XFree (value);
3387 } 3411 }
3388 else 3412 else
3389 { 3413 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines