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

Comparing rxvt-unicode/src/rxvttoolkit.C (file contents):
Revision 1.81 by root, Fri Dec 14 02:22:24 2007 UTC vs.
Revision 1.82 by root, Fri Dec 14 05:25:26 2007 UTC

297 297
298rxvt_display::rxvt_display (const char *id) 298rxvt_display::rxvt_display (const char *id)
299: refcounted (id) 299: refcounted (id)
300, selection_owner (0) 300, selection_owner (0)
301{ 301{
302 x_ev.set<rxvt_display, &rxvt_display::x_cb> (this); 302 x_ev .set<rxvt_display, &rxvt_display::x_cb > (this);
303 flush_ev.set<rxvt_display, &rxvt_display::flush_cb> (this);
303} 304}
304 305
305XrmDatabase 306XrmDatabase
306rxvt_display::get_resources (bool refresh) 307rxvt_display::get_resources (bool refresh)
307{ 308{
471 socklen_t sl = sizeof (sa); 472 socklen_t sl = sizeof (sa);
472 473
473 if (!getsockname (fd, (sockaddr *)&sa, &sl)) 474 if (!getsockname (fd, (sockaddr *)&sa, &sl))
474 is_local = sa.sun_family == AF_UNIX; 475 is_local = sa.sun_family == AF_UNIX;
475 476
477 flush_ev.start ();
476 x_ev.start (fd, ev::READ); 478 x_ev.start (fd, ev::READ);
477 fcntl (fd, F_SETFD, FD_CLOEXEC); 479 fcntl (fd, F_SETFD, FD_CLOEXEC);
478 480
479 XSelectInput (dpy, root, PropertyChangeMask); 481 XSelectInput (dpy, root, PropertyChangeMask);
480 482
567 } 569 }
568#ifdef USE_XIM 570#ifdef USE_XIM
569 } 571 }
570#endif 572#endif
571 } 573 }
574}
572 575
576void rxvt_display::flush ()
577{
573 XFlush (dpy); 578 XFlush (dpy);
574} 579}
575 580
576void rxvt_display::flush () 581void rxvt_display::flush_cb (ev::prepare &w, int revents)
577{ 582{
578 x_cb (x_ev, ev::READ); 583 flush ();
579} 584}
580 585
581void rxvt_display::reg (xevent_watcher *w) 586void rxvt_display::reg (xevent_watcher *w)
582{ 587{
583 if (!w->active) 588 if (!w->active)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines