*** empty log message ***
authorpcg <pcg>
Wed, 25 Feb 2004 15:06:03 +0000 (15:06 +0000)
committerpcg <pcg>
Wed, 25 Feb 2004 15:06:03 +0000 (15:06 +0000)
src/command.C
src/rxvtcolor.h
src/screen.C

index 6ce9850..cf697f9 100644 (file)
@@ -3106,6 +3106,9 @@ rxvt_term::xterm_seq (int op, const char *str, unsigned char resp __attribute__
           {
             set_locale (str);
             im_cb ();
+
+            if (display->selection_owner == this)
+              display->set_selection_owner (0);
           }
         break;
 #if 0
index 31b876b..5f33aa7 100644 (file)
@@ -52,8 +52,6 @@ struct rxvt_xim : refcounted {
 struct rxvt_display : refcounted {
   Atom xa_xim_servers;
 
-  rxvt_term *selection_owner;
-  
   io_manager_vec<xevent_watcher> xw;
 
   io_watcher x_ev; void x_cb (io_watcher &w, short revents);
@@ -70,6 +68,7 @@ struct rxvt_display : refcounted {
   Visual   *visual;
   Colormap cmap;
   Window   root;
+  rxvt_term *selection_owner;
 
   rxvt_display (const char *id);
   bool init ();
index 559457e..6cac83c 100644 (file)
@@ -2737,6 +2737,7 @@ rxvt_term::selection_make (Time tm)
       default:
         return;
     }
+
   selection.op = SELECTION_DONE;
 
   if (selection.clicks == 4)
@@ -2797,7 +2798,7 @@ rxvt_term::selection_make (Time tm)
       return;
     }
 
-  // due to MB_MAX_CUR, selection wastage is usually high, so realloc
+  // due to MB_CUR_MAX, selection wastage is usually high, so realloc
   if (str - (char *)new_selection_text > 1024)
     new_selection_text = (unsigned char *)rxvt_realloc (new_selection_text, i + 1);
 
@@ -2821,12 +2822,12 @@ rxvt_term::selection_make (Time tm)
     if (XmbTextListToTextProperty (display->display, &cl, 1, XStringStyle, &ct) >= 0)
       {
         XChangeProperty (display->display, display->root, XA_CUT_BUFFER0, XA_STRING, 8,
-                        PropModeReplace, ct.value, ct.nitems);
+                         PropModeReplace, ct.value, ct.nitems);
         XFree (ct.value);
       }
     else
       XChangeProperty (display->display, display->root, XA_CUT_BUFFER0, XA_STRING, 8,
-                      PropModeReplace, selection.text, (int)selection.len);
+                       PropModeReplace, selection.text, (int)selection.len);
   }
 
   selection_time = tm;