… | |
… | |
540 | } |
540 | } |
541 | #endif |
541 | #endif |
542 | |
542 | |
543 | void rxvt_display::x_cb (ev::io &w, int revents) |
543 | void rxvt_display::x_cb (ev::io &w, int revents) |
544 | { |
544 | { |
545 | do |
545 | while (XEventsQueued (dpy, QueuedAfterReading)) |
546 | { |
546 | { |
547 | XEvent xev; |
547 | XEvent xev; |
548 | XNextEvent (dpy, &xev); |
548 | XNextEvent (dpy, &xev); |
549 | |
549 | |
550 | #ifdef USE_XIM |
550 | #ifdef USE_XIM |
… | |
… | |
567 | } |
567 | } |
568 | #ifdef USE_XIM |
568 | #ifdef USE_XIM |
569 | } |
569 | } |
570 | #endif |
570 | #endif |
571 | } |
571 | } |
572 | while (XEventsQueued (dpy, QueuedAlready)); |
|
|
573 | |
572 | |
574 | XFlush (dpy); |
573 | XFlush (dpy); |
575 | } |
574 | } |
576 | |
575 | |
577 | void rxvt_display::flush () |
576 | void rxvt_display::flush () |
578 | { |
577 | { |
579 | if (XEventsQueued (dpy, QueuedAlready)) |
|
|
580 | x_cb (x_ev, ev::READ); |
578 | x_cb (x_ev, ev::READ); |
581 | |
|
|
582 | XFlush (dpy); |
|
|
583 | } |
579 | } |
584 | |
580 | |
585 | void rxvt_display::reg (xevent_watcher *w) |
581 | void rxvt_display::reg (xevent_watcher *w) |
586 | { |
582 | { |
587 | if (!w->active) |
583 | if (!w->active) |