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.379 by sf-exg, Fri Apr 1 11:06:42 2011 UTC vs.
Revision 1.383 by sf-exg, Fri Apr 29 13:08:24 2011 UTC

1924 1924
1925# ifndef NO_MAPALERT 1925# ifndef NO_MAPALERT
1926# ifdef MAPALERT_OPTION 1926# ifdef MAPALERT_OPTION
1927 if (option (Opt_mapAlert)) 1927 if (option (Opt_mapAlert))
1928# endif 1928# endif
1929 XMapWindow (dpy, parent[0]); 1929 XMapWindow (dpy, parent);
1930# endif 1930# endif
1931 1931
1932# if ENABLE_FRILLS 1932# if ENABLE_FRILLS
1933 if (option (Opt_urgentOnBell)) 1933 if (option (Opt_urgentOnBell))
1934 set_urgency (1); 1934 set_urgency (1);
1947 HOOK_INVOKE ((this, HOOK_BELL, DT_END)); 1947 HOOK_INVOKE ((this, HOOK_BELL, DT_END));
1948#endif 1948#endif
1949} 1949}
1950 1950
1951/* ------------------------------------------------------------------------- */ 1951/* ------------------------------------------------------------------------- */
1952/* ARGSUSED */
1953void 1952void
1954rxvt_term::scr_printscreen (int fullhist) NOTHROW 1953rxvt_term::scr_printscreen (int fullhist) NOTHROW
1955{ 1954{
1956#ifdef PRINTPIPE 1955#ifdef PRINTPIPE
1957 int nrows, row_start; 1956 int nrows, row_start;
2520 if (bg_pixmap != None) 2519 if (bg_pixmap != None)
2521 { 2520 {
2522# ifdef ENABLE_TRANSPARENCY 2521# ifdef ENABLE_TRANSPARENCY
2523 if (bg_flags & BG_IS_TRANSPARENT) 2522 if (bg_flags & BG_IS_TRANSPARENT)
2524 { 2523 {
2525 XSetWindowBackgroundPixmap (dpy, parent[0], bg_pixmap); 2524 XSetWindowBackgroundPixmap (dpy, parent, bg_pixmap);
2526 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative); 2525 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative);
2527 2526
2528 transparent = true; 2527 transparent = true;
2529 } 2528 }
2530 else 2529 else
2531# endif 2530# endif
2532 { 2531 {
2533 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); 2532 XSetWindowBackground (dpy, parent, pix_colors[Color_border]);
2534 XSetWindowBackgroundPixmap (dpy, vt, bg_pixmap); 2533 XSetWindowBackgroundPixmap (dpy, vt, bg_pixmap);
2535 } 2534 }
2536 } 2535 }
2537 else 2536 else
2538#endif 2537#endif
2539 { 2538 {
2540 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); 2539 XSetWindowBackground (dpy, parent, pix_colors[Color_border]);
2541 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 2540 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
2542 } 2541 }
2543 2542
2544 XClearWindow (dpy, parent[0]); 2543 XClearWindow (dpy, parent);
2545 2544
2546 if (scrollBar.win) 2545 if (scrollBar.win)
2547 { 2546 {
2548 if (transparent) 2547 if (transparent)
2549 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative); 2548 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative);
2736 tt_paste (data, len); 2735 tt_paste (data, len);
2737} 2736}
2738 2737
2739/* ------------------------------------------------------------------------- */ 2738/* ------------------------------------------------------------------------- */
2740/* 2739/*
2741 * Request the current selection: 2740 * Request PRIMARY, SECONDARY or CLIPBOARD selection.
2742 * Order: > internal selection if available 2741 * if the requested selection has no owner or is empty CUT_BUFFER0 is used
2743 * > PRIMARY, SECONDARY, CLIPBOARD if ownership is claimed (+) 2742 * as fallback
2744 * > CUT_BUFFER0
2745 * (+) if ownership is claimed but property is empty, rxvt_selection_paste ()
2746 * will auto fallback to CUT_BUFFER0
2747 * EXT: button 2 release 2743 * EXT: button 2 release
2748 */ 2744 */
2749void 2745void
2750rxvt_term::selection_request (Time tm, int selnum) NOTHROW 2746rxvt_term::selection_request (Time tm, int selnum) NOTHROW
2751{ 2747{
3405 * EXT: SelectionRequest 3401 * EXT: SelectionRequest
3406 */ 3402 */
3407void 3403void
3408rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW 3404rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW
3409{ 3405{
3406 Atom property = rq.property == None ? rq.target : rq.property;
3410 XSelectionEvent ev; 3407 XSelectionEvent ev;
3411 3408
3412 ev.type = SelectionNotify; 3409 ev.type = SelectionNotify;
3413 ev.property = None; 3410 ev.property = None;
3414 ev.display = rq.display; 3411 ev.display = rq.display;
3429 *target++ = xa[XA_COMPOUND_TEXT]; 3426 *target++ = xa[XA_COMPOUND_TEXT];
3430#if X_HAVE_UTF8_STRING 3427#if X_HAVE_UTF8_STRING
3431 *target++ = xa[XA_UTF8_STRING]; 3428 *target++ = xa[XA_UTF8_STRING];
3432#endif 3429#endif
3433 3430
3434 XChangeProperty (dpy, rq.requestor, rq.property, XA_ATOM, 3431 XChangeProperty (dpy, rq.requestor, property, XA_ATOM,
3435 32, PropModeReplace, 3432 32, PropModeReplace,
3436 (unsigned char *)target_list, target - target_list); 3433 (unsigned char *)target_list, target - target_list);
3437 ev.property = rq.property; 3434 ev.property = property;
3438 } 3435 }
3439#if TODO // TODO 3436#if TODO // TODO
3440 else if (rq.target == xa[XA_MULTIPLE]) 3437 else if (rq.target == xa[XA_MULTIPLE])
3441 { 3438 {
3442 /* TODO: Handle MULTIPLE */ 3439 /* TODO: Handle MULTIPLE */
3443 } 3440 }
3444#endif 3441#endif
3445 else if (rq.target == xa[XA_TIMESTAMP] && rq.selection == XA_PRIMARY && selection.text) 3442 else if (rq.target == xa[XA_TIMESTAMP] && rq.selection == XA_PRIMARY && selection.text)
3446 { 3443 {
3447 XChangeProperty (dpy, rq.requestor, rq.property, rq.target, 3444 XChangeProperty (dpy, rq.requestor, property, rq.target,
3448 32, PropModeReplace, (unsigned char *)&selection_time, 1); 3445 32, PropModeReplace, (unsigned char *)&selection_time, 1);
3449 ev.property = rq.property; 3446 ev.property = property;
3450 } 3447 }
3451 else if (rq.target == xa[XA_TIMESTAMP] && rq.selection == xa[XA_CLIPBOARD] && selection.clip_text) 3448 else if (rq.target == xa[XA_TIMESTAMP] && rq.selection == xa[XA_CLIPBOARD] && selection.clip_text)
3452 { 3449 {
3453 XChangeProperty (dpy, rq.requestor, rq.property, rq.target, 3450 XChangeProperty (dpy, rq.requestor, property, rq.target,
3454 32, PropModeReplace, (unsigned char *)&clipboard_time, 1); 3451 32, PropModeReplace, (unsigned char *)&clipboard_time, 1);
3455 ev.property = rq.property; 3452 ev.property = property;
3456 } 3453 }
3457 else if (rq.target == XA_STRING 3454 else if (rq.target == XA_STRING
3458 || rq.target == xa[XA_TEXT] 3455 || rq.target == xa[XA_TEXT]
3459 || rq.target == xa[XA_COMPOUND_TEXT] 3456 || rq.target == xa[XA_COMPOUND_TEXT]
3460 || rq.target == xa[XA_UTF8_STRING] 3457 || rq.target == xa[XA_UTF8_STRING]
3531 ct.value = (unsigned char *)cl; 3528 ct.value = (unsigned char *)cl;
3532 ct.nitems = selectlen; 3529 ct.nitems = selectlen;
3533 ct.encoding = target; 3530 ct.encoding = target;
3534 } 3531 }
3535 3532
3536 XChangeProperty (dpy, rq.requestor, rq.property, 3533 XChangeProperty (dpy, rq.requestor, property,
3537 ct.encoding, 8, PropModeReplace, 3534 ct.encoding, 8, PropModeReplace,
3538 ct.value, (int)ct.nitems); 3535 ct.value, (int)ct.nitems);
3539 ev.property = rq.property; 3536 ev.property = property;
3540 3537
3541 if (freect) 3538 if (freect)
3542 XFree (ct.value); 3539 XFree (ct.value);
3543 } 3540 }
3544 3541

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines