Commit 22b350f9916947ead9c0db6d942ac5ba03ea4ca8

More robust implementation of qt_x11_wait_for_window_manager

Make sure we recieve both ReparentNotify and MapNotify events.
Also change the timeout to 2 seconds to cope with slow machines

Reviewed-by: Denis
  
358358 if (!w->testAttribute(Qt::WA_WState_Created))
359359 return;
360360 while (!XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), ReparentNotify, &ev)) {
361 if (XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), MapNotify, &ev))
362 break;
363 if (t.elapsed() > 500)
364 return; // give up, no event available
361 if (t.elapsed() > 2000)
362 return;
365363 qApp->syncX(); // non-busy wait
366364 }
365
366 while (!XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), MapNotify, &ev)) {
367 if (t.elapsed() > 2000)
368 return;
369 qApp->syncX(); // non-busy wait
370 }
371
367372 qApp->x11ProcessEvent(&ev);
368373 if (XCheckTypedWindowEvent(X11->display, w->effectiveWinId(), ConfigureNotify, &ev))
369374 qApp->x11ProcessEvent(&ev);