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.102 by root, Tue Nov 4 11:03:29 2008 UTC

59#if ENABLE_EWMH 59#if ENABLE_EWMH
60 "_NET_WM_PID", 60 "_NET_WM_PID",
61 "_NET_WM_NAME", 61 "_NET_WM_NAME",
62 "_NET_WM_ICON_NAME", 62 "_NET_WM_ICON_NAME",
63 "_NET_WM_PING", 63 "_NET_WM_PING",
64 "_NET_WM_ICON",
64#endif 65#endif
65#if USE_XIM 66#if USE_XIM
66 "WM_LOCALE_NAME", 67 "WM_LOCALE_NAME",
67 "XIM_SERVERS", 68 "XIM_SERVERS",
68#endif 69#endif
543} 544}
544#endif 545#endif
545 546
546void rxvt_display::x_cb (ev::io &w, int revents) 547void rxvt_display::x_cb (ev::io &w, int revents)
547{ 548{
549 flush_ev.start ();
550}
551
552void rxvt_display::flush_cb (ev::prepare &w, int revents)
553{
548 while (XEventsQueued (dpy, QueuedAfterReading)) 554 while (XEventsQueued (dpy, QueuedAfterFlush))
555 do
549 { 556 {
550 XEvent xev; 557 XEvent xev;
551 XNextEvent (dpy, &xev); 558 XNextEvent (dpy, &xev);
552 559
553#ifdef USE_XIM 560#ifdef USE_XIM
554 if (!XFilterEvent (&xev, None)) 561 if (!XFilterEvent (&xev, None))
555#endif
556 { 562 {
557 if (xev.type == PropertyNotify 563 if (xev.type == PropertyNotify
558 && xev.xany.window == root 564 && xev.xany.window == root
559 && xev.xproperty.atom == xa[XA_XIM_SERVERS]) 565 && xev.xproperty.atom == xa[XA_XIM_SERVERS])
560 im_change_check (); 566 im_change_check ();
561 567#endif
562 if (xev.type == MappingNotify) 568 if (xev.type == MappingNotify)
563 XRefreshKeyboardMapping (&xev.xmapping); 569 XRefreshKeyboardMapping (&xev.xmapping);
564 570
565 for (int i = xw.size (); i--; ) 571 for (int i = xw.size (); i--; )
566 { 572 {
567 if (!xw[i]) 573 if (!xw[i])
568 xw.erase_unordered (i); 574 xw.erase_unordered (i);
569 else if (xw[i]->window == xev.xany.window) 575 else if (xw[i]->window == xev.xany.window)
570 xw[i]->call (xev); 576 xw[i]->call (xev);
571 } 577 }
578#ifdef USE_XIM
572 } 579 }
580#endif
573 } 581 }
582 while (XEventsQueued (dpy, QueuedAlready));
574 583
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 (); 584 w.stop ();
583} 585}
584 586
585void rxvt_display::reg (xevent_watcher *w) 587void rxvt_display::reg (xevent_watcher *w)
586{ 588{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines