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.95 by root, Sat Jan 26 12:03:36 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#endif
556 { 561 {
557 if (xev.type == PropertyNotify 562 if (xev.type == PropertyNotify
558 && xev.xany.window == root 563 && xev.xany.window == root
559 && xev.xproperty.atom == xa[XA_XIM_SERVERS]) 564 && xev.xproperty.atom == xa[XA_XIM_SERVERS])
560 im_change_check (); 565 im_change_check ();
561 566#endif
562 if (xev.type == MappingNotify) 567 if (xev.type == MappingNotify)
563 XRefreshKeyboardMapping (&xev.xmapping); 568 XRefreshKeyboardMapping (&xev.xmapping);
564 569
565 for (int i = xw.size (); i--; ) 570 for (int i = xw.size (); i--; )
566 { 571 {
567 if (!xw[i]) 572 if (!xw[i])
568 xw.erase_unordered (i); 573 xw.erase_unordered (i);
569 else if (xw[i]->window == xev.xany.window) 574 else if (xw[i]->window == xev.xany.window)
570 xw[i]->call (xev); 575 xw[i]->call (xev);
571 } 576 }
577#ifdef USE_XIM
572 } 578 }
579#endif
573 } 580 }
581 while (XEventsQueued (dpy, QueuedAlready));
574 582
575 flush_ev.start ();
576}
577
578void rxvt_display::flush_cb (ev::prepare &w, int revents)
579{
580 x_cb(x_ev,0);//D
581 XFlush (dpy);
582 w.stop (); 583 w.stop ();
583} 584}
584 585
585void rxvt_display::reg (xevent_watcher *w) 586void rxvt_display::reg (xevent_watcher *w)
586{ 587{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines