--- rxvt-unicode/src/rxvttoolkit.C 2007/12/14 06:17:27 1.84 +++ rxvt-unicode/src/rxvttoolkit.C 2007/12/24 08:21:39 1.87 @@ -503,6 +503,7 @@ XFreeCursor (dpy, blank_cursor); #endif x_ev.stop (); + flush_ev.stop (); #ifdef USE_XIM xims.clear (); #endif @@ -600,7 +601,12 @@ void rxvt_display::set_selection_owner (rxvt_term *owner) { if (selection_owner && selection_owner != owner) - selection_owner->selection_clear (); + { + rxvt_term *owner = selection_owner; + + owner->selection_clear (); + owner->flush (); + } selection_owner = owner; }