- ioncore_flush();
-
- if(QLength(ioncore_g.dpy)>0)
- ioncore_x_connection_handler(ioncore_g.conn, NULL);
- else
- mainloop_select();
+
+ if(QLength(ioncore_g.dpy)==0){
+ XSync(ioncore_g.dpy, False);
+
+ if(QLength(ioncore_g.dpy)==0){
+ ioncore_flushfocus();
+ XSync(ioncore_g.dpy, False);
+
+ if(QLength(ioncore_g.dpy)==0){
+ mainloop_select();
+ continue;
+ }
+ }
+ }
+
+ ioncore_x_connection_handler(ioncore_g.conn, NULL);