VirtualBox

Changeset 29558 in vbox for trunk


Ignore:
Timestamp:
May 17, 2010 3:05:22 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: 4758: New running VM core: Initial wrong resize event should be fixed (X11 at last).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r29410 r29558  
    615615        display.SetFramebuffer(m_uScreenId, CFramebuffer(m_pFrameBuffer));
    616616    }
     617
     618#ifdef Q_WS_X11
     619    /* Processing pseudo resize-event to synchronize frame-buffer with stored framebuffer size: */
     620    QSize size = guestSizeHint();
     621    UIResizeEvent event(FramebufferPixelFormat_Opaque, NULL, 0, 0, size.width(), size.height());
     622    frameBuffer()->resizeEvent(&event);
     623#endif /* Q_WS_X11 */
    617624}
    618625
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r29339 r29558  
    561561
    562562        /* Normalize view to the optimal size:
    563            Note: Cause of the async behavior of some Linux WM's we have to
    564            delay this a little bit. On Mac OS X this is not necessary and
    565            create even wrong resize events. So there we set the geometry
    566            immediately. */
     563         * Note: Cause of the async behavior of X11 (at least GNOME) we have to delay this a little bit.
     564         * On Mac OS X and MS Windows this is not necessary and create even wrong resize events.
     565         * So there we set the geometry immediately. */
    567566        if (machineView())
    568 #if defined(Q_WS_MAC) || defined(Q_WS_WIN)
     567#ifdef Q_WS_X11
     568            QTimer::singleShot(0, machineView(), SLOT(sltNormalizeGeometry()));
     569#else /* Q_WS_X11 */
    569570            machineView()->normalizeGeometry(true);
    570 #else /* Q_WS_MAC || Q_WS_WIN */
    571             QTimer::singleShot(0, machineView(), SLOT(sltNormalizeGeometry()));
    572 #endif /* Q_WS_MAC || Q_WS_WIN */
     571#endif /* !Q_WS_X11 */
    573572    }
    574573
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