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.100 by root, Sat Jan 26 13:31:13 2008 UTC vs.
Revision 1.101 by root, Sat Jan 26 14:35:28 2008 UTC

543} 543}
544#endif 544#endif
545 545
546void rxvt_display::x_cb (ev::io &w, int revents) 546void rxvt_display::x_cb (ev::io &w, int revents)
547{ 547{
548 flush_ev.start ();
549}
550
551void rxvt_display::flush_cb (ev::prepare &w, int revents)
552{
548 while (XEventsQueued (dpy, QueuedAfterReading)) 553 while (XEventsQueued (dpy, QueuedAfterFlush))
554 do
549 { 555 {
550 XEvent xev; 556 XEvent xev;
551 XNextEvent (dpy, &xev); 557 XNextEvent (dpy, &xev);
552 558
553#ifdef USE_XIM 559#ifdef USE_XIM
554 if (!XFilterEvent (&xev, None)) 560 if (!XFilterEvent (&xev, None))
555 { 561 {
556 if (xev.type == PropertyNotify 562 if (xev.type == PropertyNotify
557 && xev.xany.window == root 563 && xev.xany.window == root
558 && xev.xproperty.atom == xa[XA_XIM_SERVERS]) 564 && xev.xproperty.atom == xa[XA_XIM_SERVERS])
559 im_change_check (); 565 im_change_check ();
560#endif 566#endif
561 if (xev.type == MappingNotify) 567 if (xev.type == MappingNotify)
562 XRefreshKeyboardMapping (&xev.xmapping); 568 XRefreshKeyboardMapping (&xev.xmapping);
563 569
564 for (int i = xw.size (); i--; ) 570 for (int i = xw.size (); i--; )
565 { 571 {
566 if (!xw[i]) 572 if (!xw[i])
567 xw.erase_unordered (i); 573 xw.erase_unordered (i);
568 else if (xw[i]->window == xev.xany.window) 574 else if (xw[i]->window == xev.xany.window)
569 xw[i]->call (xev); 575 xw[i]->call (xev);
570 } 576 }
571#ifdef USE_XIM 577#ifdef USE_XIM
572 } 578 }
573#endif 579#endif
574 } 580 }
575}
576
577void rxvt_display::flush_cb (ev::prepare &w, int revents)
578{
579 while (XEventsQueued (dpy, QueuedAfterFlush)) 581 while (XEventsQueued (dpy, QueuedAlready));
580 x_cb (x_ev, EV_READ);
581 582
582 w.stop (); 583 w.stop ();
583} 584}
584 585
585void rxvt_display::reg (xevent_watcher *w) 586void rxvt_display::reg (xevent_watcher *w)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines