From: root Date: Fri, 20 Jan 2006 10:35:25 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=50024171b2c10c7e789a554b50d3fa8adcdbe9dd;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/command.C b/src/command.C index fd8a4d99..22e2e364 100644 --- a/src/command.C +++ b/src/command.C @@ -463,7 +463,7 @@ rxvt_term::lookup_key (XKeyEvent &ev) { /* normal XTerm key bindings */ case XK_Insert: /* Shift+Insert = paste mouse selection */ - selection_request (ev.time, Sel_Primary); + selection_request (ev.time); return; #if TODO /* rxvt extras */ @@ -2156,14 +2156,8 @@ rxvt_term::button_release (XButtonEvent &ev) break; case Button2: - if (IN_RANGE_EXC (ev.x, 0, width) - && IN_RANGE_EXC (ev.y, 0, height)) // inside window? - { - if (ev.state & ShiftMask) - selection_request (ev.time, Sel_Clipboard); - else - selection_request (ev.time, Sel_Primary); - } + if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? + selection_request (ev.time, ev.state & ShiftMask ? Sel_Clipboard : Sel_Primary); break; #ifdef MOUSE_WHEEL diff --git a/src/rxvt.h b/src/rxvt.h index 3c9adae9..36f45c64 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -1472,7 +1472,7 @@ struct rxvt_term : zero_initialized, rxvt_vars { void selection_check (int check_more) NOTHROW; void selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW; void selection_property (Window win, Atom prop) NOTHROW; - void selection_request (Time tm, int selnum) NOTHROW; + void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; int selection_request_other (Atom target, int selnum) NOTHROW; void selection_clear () NOTHROW; void selection_make (Time tm); diff --git a/src/screen.C b/src/screen.C index 7c63e125..6cd1c5fa 100644 --- a/src/screen.C +++ b/src/screen.C @@ -2806,12 +2806,7 @@ rxvt_term::selection_property (Window win, Atom prop) NOTHROW void rxvt_term::selection_request (Time tm, int selnum) NOTHROW { -/* After making a selection with selection_make this function will always - * return the internal selection, which is not correct IMO, now much more since - * I added the selnum parameter. - */ -#if 0 - if (selection.text) + if (selection.text && selnum == Sel_Primary) { /* internal selection */ char *str = rxvt_wcstombs (selection.text, selection.len); paste (str, strlen (str)); @@ -2819,7 +2814,6 @@ rxvt_term::selection_request (Time tm, int selnum) NOTHROW return; } else -#endif { selection_request_time = tm; selection_wait = Sel_normal;