VirtualBox

Changeset 8893

Show
Ignore:
Timestamp:
05/16/08 14:52:00 (5 months ago)
Author:
vboxsync
Message:

FE/Qt4: Fix: On X11 sometimes the preferred size isn't calculated correctly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r8888 r8893  
    11271127                resize (re->width(), re->height()); 
    11281128                updateSliders(); 
    1129                 /* let our toplevel widget calculate its sizeHint properly */ 
    1130                 QApplication::sendPostedEvents (0, QEvent::LayoutRequest); 
     1129                /* Let our toplevel widget calculate its sizeHint properly. */ 
     1130#ifdef Q_WS_X11 
     1131                /* We use processEvents rather than sendPostedEvents & set the 
     1132                 * time out value to max cause on X11 otherwise the layout 
     1133                 * isn't calculated correctly. Dosn't find the bug in Qt, but 
     1134                 * this could be triggered through the async nature of the X11 
     1135                 * window event system. */ 
     1136                QCoreApplication::processEvents (QEventLoop::AllEvents, INT_MAX); 
     1137#else /* Q_WS_X11 */ 
     1138                QCoreApplication::sendPostedEvents (0, QEvent::LayoutRequest); 
     1139#endif /* Q_WS_X11 */ 
    11311140 
    11321141                normalizeGeometry (true /* adjustPosition */); 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy