ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/screen.C
(Generate patch)

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.155 by root, Thu Feb 3 07:45:39 2005 UTC vs.
Revision 1.157 by root, Sun Feb 13 08:56:28 2005 UTC

28#include "rxvt.h" /* NECESSARY */ 28#include "rxvt.h" /* NECESSARY */
29 29
30#include <X11/Xmd.h> /* get the typedef for CARD32 */ 30#include <X11/Xmd.h> /* get the typedef for CARD32 */
31 31
32#include <inttypes.h> 32#include <inttypes.h>
33#include <wchar.h>
34 33
35#include "salloc.C" // HACK, should be a seperate compile! 34#include "salloc.C" // HACK, should be a seperate compile!
36 35
37inline void fill_text (text_t *start, text_t value, int len) 36inline void fill_text (text_t *start, text_t value, int len)
38{ 37{
3535 */ 3534 */
3536void 3535void
3537rxvt_term::selection_send (const XSelectionRequestEvent &rq) 3536rxvt_term::selection_send (const XSelectionRequestEvent &rq)
3538{ 3537{
3539 XSelectionEvent ev; 3538 XSelectionEvent ev;
3539 dDisp;
3540 3540
3541 ev.type = SelectionNotify; 3541 ev.type = SelectionNotify;
3542 ev.property = None; 3542 ev.property = None;
3543 ev.display = rq.display; 3543 ev.display = rq.display;
3544 ev.requestor = rq.requestor; 3544 ev.requestor = rq.requestor;
3558 *target++ = xa[XA_COMPOUND_TEXT]; 3558 *target++ = xa[XA_COMPOUND_TEXT];
3559#if X_HAVE_UTF8_STRING 3559#if X_HAVE_UTF8_STRING
3560 *target++ = xa[XA_UTF8_STRING]; 3560 *target++ = xa[XA_UTF8_STRING];
3561#endif 3561#endif
3562 3562
3563 XChangeProperty (display->display, rq.requestor, rq.property, XA_ATOM, 3563 XChangeProperty (disp, rq.requestor, rq.property, XA_ATOM,
3564 32, PropModeReplace, 3564 32, PropModeReplace,
3565 (unsigned char *)target_list, target - target_list); 3565 (unsigned char *)target_list, target - target_list);
3566 ev.property = rq.property; 3566 ev.property = rq.property;
3567 } 3567 }
3568#if TODO // TODO 3568#if TODO // TODO
3571 /* TODO: Handle MULTIPLE */ 3571 /* TODO: Handle MULTIPLE */
3572 } 3572 }
3573#endif 3573#endif
3574 else if (rq.target == xa[XA_TIMESTAMP] && selection.text) 3574 else if (rq.target == xa[XA_TIMESTAMP] && selection.text)
3575 { 3575 {
3576 XChangeProperty (display->display, rq.requestor, rq.property, rq.target, 3576 XChangeProperty (disp, rq.requestor, rq.property, rq.target,
3577 32, PropModeReplace, (unsigned char *)&selection_time, 1); 3577 32, PropModeReplace, (unsigned char *)&selection_time, 1);
3578 ev.property = rq.property; 3578 ev.property = rq.property;
3579 } 3579 }
3580 else if (rq.target == XA_STRING 3580 else if (rq.target == XA_STRING
3581 || rq.target == xa[XA_TEXT] 3581 || rq.target == xa[XA_TEXT]
3639 ct.value = (unsigned char *)rxvt_wcstoutf8 (cl, selectlen); 3639 ct.value = (unsigned char *)rxvt_wcstoutf8 (cl, selectlen);
3640 ct.nitems = strlen ((char *)ct.value); 3640 ct.nitems = strlen ((char *)ct.value);
3641 } 3641 }
3642 else 3642 else
3643#endif 3643#endif
3644 if (XwcTextListToTextProperty (display->display, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0) 3644 if (XwcTextListToTextProperty (disp, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0)
3645 freect = 1; 3645 freect = 1;
3646 else 3646 else
3647 { 3647 {
3648 /* if we failed to convert then send it raw */ 3648 /* if we failed to convert then send it raw */
3649 ct.value = (unsigned char *)cl; 3649 ct.value = (unsigned char *)cl;
3650 ct.nitems = selectlen; 3650 ct.nitems = selectlen;
3651 ct.encoding = target; 3651 ct.encoding = target;
3652 } 3652 }
3653 3653
3654 XChangeProperty (display->display, rq.requestor, rq.property, 3654 XChangeProperty (disp, rq.requestor, rq.property,
3655 ct.encoding, 8, PropModeReplace, 3655 ct.encoding, 8, PropModeReplace,
3656 ct.value, (int)ct.nitems); 3656 ct.value, (int)ct.nitems);
3657 ev.property = rq.property; 3657 ev.property = rq.property;
3658 3658
3659 if (freect) 3659 if (freect)
3660 XFree (ct.value); 3660 XFree (ct.value);
3661 } 3661 }
3662 3662
3663 XSendEvent (display->display, rq.requestor, False, 0L, (XEvent *)&ev); 3663 XSendEvent (disp, rq.requestor, False, 0L, (XEvent *)&ev);
3664} 3664}
3665 3665
3666/* ------------------------------------------------------------------------- * 3666/* ------------------------------------------------------------------------- *
3667 * MOUSE ROUTINES * 3667 * MOUSE ROUTINES *
3668 * ------------------------------------------------------------------------- */ 3668 * ------------------------------------------------------------------------- */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines