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.250 by root, Wed Jan 25 13:24:45 2006 UTC vs.
Revision 1.251 by root, Wed Jan 25 21:03:04 2006 UTC

3514 */ 3514 */
3515void 3515void
3516rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW 3516rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW
3517{ 3517{
3518 XSelectionEvent ev; 3518 XSelectionEvent ev;
3519 dDisp;
3520 3519
3521 ev.type = SelectionNotify; 3520 ev.type = SelectionNotify;
3522 ev.property = None; 3521 ev.property = None;
3523 ev.display = rq.display; 3522 ev.display = rq.display;
3524 ev.requestor = rq.requestor; 3523 ev.requestor = rq.requestor;
3538 *target++ = xa[XA_COMPOUND_TEXT]; 3537 *target++ = xa[XA_COMPOUND_TEXT];
3539#if X_HAVE_UTF8_STRING 3538#if X_HAVE_UTF8_STRING
3540 *target++ = xa[XA_UTF8_STRING]; 3539 *target++ = xa[XA_UTF8_STRING];
3541#endif 3540#endif
3542 3541
3543 XChangeProperty (disp, rq.requestor, rq.property, XA_ATOM, 3542 XChangeProperty (xdisp, rq.requestor, rq.property, XA_ATOM,
3544 32, PropModeReplace, 3543 32, PropModeReplace,
3545 (unsigned char *)target_list, target - target_list); 3544 (unsigned char *)target_list, target - target_list);
3546 ev.property = rq.property; 3545 ev.property = rq.property;
3547 } 3546 }
3548#if TODO // TODO 3547#if TODO // TODO
3551 /* TODO: Handle MULTIPLE */ 3550 /* TODO: Handle MULTIPLE */
3552 } 3551 }
3553#endif 3552#endif
3554 else if (rq.target == xa[XA_TIMESTAMP] && selection.text) 3553 else if (rq.target == xa[XA_TIMESTAMP] && selection.text)
3555 { 3554 {
3556 XChangeProperty (disp, rq.requestor, rq.property, rq.target, 3555 XChangeProperty (xdisp, rq.requestor, rq.property, rq.target,
3557 32, PropModeReplace, (unsigned char *)&selection_time, 1); 3556 32, PropModeReplace, (unsigned char *)&selection_time, 1);
3558 ev.property = rq.property; 3557 ev.property = rq.property;
3559 } 3558 }
3560 else if (rq.target == XA_STRING 3559 else if (rq.target == XA_STRING
3561 || rq.target == xa[XA_TEXT] 3560 || rq.target == xa[XA_TEXT]
3619 ct.value = (unsigned char *)rxvt_wcstoutf8 (cl, selectlen); 3618 ct.value = (unsigned char *)rxvt_wcstoutf8 (cl, selectlen);
3620 ct.nitems = strlen ((char *)ct.value); 3619 ct.nitems = strlen ((char *)ct.value);
3621 } 3620 }
3622 else 3621 else
3623#endif 3622#endif
3624 if (XwcTextListToTextProperty (disp, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0) 3623 if (XwcTextListToTextProperty (xdisp, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0)
3625 freect = 1; 3624 freect = 1;
3626 else 3625 else
3627 { 3626 {
3628 /* if we failed to convert then send it raw */ 3627 /* if we failed to convert then send it raw */
3629 ct.value = (unsigned char *)cl; 3628 ct.value = (unsigned char *)cl;
3630 ct.nitems = selectlen; 3629 ct.nitems = selectlen;
3631 ct.encoding = target; 3630 ct.encoding = target;
3632 } 3631 }
3633 3632
3634 XChangeProperty (disp, rq.requestor, rq.property, 3633 XChangeProperty (xdisp, rq.requestor, rq.property,
3635 ct.encoding, 8, PropModeReplace, 3634 ct.encoding, 8, PropModeReplace,
3636 ct.value, (int)ct.nitems); 3635 ct.value, (int)ct.nitems);
3637 ev.property = rq.property; 3636 ev.property = rq.property;
3638 3637
3639 if (freect) 3638 if (freect)
3640 XFree (ct.value); 3639 XFree (ct.value);
3641 } 3640 }
3642 3641
3643 XSendEvent (disp, rq.requestor, False, 0L, (XEvent *)&ev); 3642 XSendEvent (xdisp, rq.requestor, False, 0L, (XEvent *)&ev);
3644} 3643}
3645 3644
3646/* ------------------------------------------------------------------------- * 3645/* ------------------------------------------------------------------------- *
3647 * MOUSE ROUTINES * 3646 * MOUSE ROUTINES *
3648 * ------------------------------------------------------------------------- */ 3647 * ------------------------------------------------------------------------- */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines