VirtualBox

Changeset 8893 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 16, 2008 12:52:00 PM (17 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 */);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette