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