*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 10:35:25 +0000 (10:35 +0000)
committerroot <root>
Fri, 20 Jan 2006 10:35:25 +0000 (10:35 +0000)
src/command.C
src/rxvt.h
src/screen.C

index fd8a4d99cab762024c4d4badf8fdec8c3f74c2c8..22e2e364cc004debd588a29d0fcd5a0ce3bf2d97 100644 (file)
@@ -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
index 3c9adae9161f68f738b4c8479ff3c2c9af98f89f..36f45c643248aea656d84a21678c053fe19e8044 100644 (file)
@@ -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);
index 7c63e1253fc976f0c72c6b20a817f714988ce3aa..6cd1c5fa51ba8d2b2343a2bdd5a5b11d342c9ec2 100644 (file)
@@ -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;