… | |
… | |
548 | while (XEventsQueued (dpy, QueuedAfterReading)) |
548 | while (XEventsQueued (dpy, QueuedAfterReading)) |
549 | { |
549 | { |
550 | XEvent xev; |
550 | XEvent xev; |
551 | XNextEvent (dpy, &xev); |
551 | XNextEvent (dpy, &xev); |
552 | |
552 | |
553 | flush_ev.start (); |
|
|
554 | |
|
|
555 | #ifdef USE_XIM |
553 | #ifdef USE_XIM |
556 | if (!XFilterEvent (&xev, None)) |
554 | if (!XFilterEvent (&xev, None)) |
557 | #endif |
555 | #endif |
558 | { |
556 | { |
559 | if (xev.type == PropertyNotify |
557 | if (xev.type == PropertyNotify |
560 | && xev.xany.window == root |
558 | && xev.xany.window == root |
561 | && xev.xproperty.atom == xa[XA_XIM_SERVERS]) |
559 | && xev.xproperty.atom == xa[XA_XIM_SERVERS]) |
562 | im_change_check (); |
560 | im_change_check (); |
|
|
561 | |
563 | if (xev.type == MappingNotify) |
562 | if (xev.type == MappingNotify) |
564 | XRefreshKeyboardMapping (&xev.xmapping); |
563 | XRefreshKeyboardMapping (&xev.xmapping); |
565 | |
564 | |
566 | for (int i = xw.size (); i--; ) |
565 | for (int i = xw.size (); i--; ) |
567 | { |
566 | { |
… | |
… | |
574 | } |
573 | } |
575 | } |
574 | } |
576 | |
575 | |
577 | void rxvt_display::flush_cb (ev::prepare &w, int revents) |
576 | void rxvt_display::flush_cb (ev::prepare &w, int revents) |
578 | { |
577 | { |
|
|
578 | XFlush (dpy); |
|
|
579 | if (XEventsQueued (dpy, QueuedAfterReading)) |
|
|
580 | x_cb(x_ev,0);//D |
|
|
581 | XFlush (dpy); |
|
|
582 | if (XEventsQueued (dpy, QueuedAfterReading)) |
|
|
583 | x_cb(x_ev,0);//D |
|
|
584 | XFlush (dpy); |
579 | w.stop (); |
585 | w.stop (); |
580 | XFlush (dpy); |
|
|
581 | } |
586 | } |
582 | |
587 | |
583 | void rxvt_display::reg (xevent_watcher *w) |
588 | void rxvt_display::reg (xevent_watcher *w) |
584 | { |
589 | { |
585 | if (!w->active) |
590 | if (!w->active) |