From ca8d138ce1ff00846ca2198356db55df5eb07970 Mon Sep 17 00:00:00 2001 From: pcg Date: Wed, 25 Feb 2004 15:06:03 +0000 Subject: [PATCH] *** empty log message *** --- src/command.C | 3 +++ src/rxvtcolor.h | 3 +-- src/screen.C | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/command.C b/src/command.C index 6ce98502..cf697f92 100644 --- a/src/command.C +++ b/src/command.C @@ -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 diff --git a/src/rxvtcolor.h b/src/rxvtcolor.h index 31b876b8..5f33aa79 100644 --- a/src/rxvtcolor.h +++ b/src/rxvtcolor.h @@ -52,8 +52,6 @@ struct rxvt_xim : refcounted { struct rxvt_display : refcounted { Atom xa_xim_servers; - rxvt_term *selection_owner; - io_manager_vec 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 (); diff --git a/src/screen.C b/src/screen.C index 559457e0..6cac83cd 100644 --- a/src/screen.C +++ b/src/screen.C @@ -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; -- 2.34.1