VirtualBox

Changeset 12097 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 4, 2008 2:30:08 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
36038
Message:

FE/Qt4-OSX: Don't use Sheets if we are in fullscreen (bug #3136).

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxCloseVMDlg.h

    r9729 r12097  
    2828#include "QIDialog.h"
    2929
    30 class VBoxCloseVMDlg : public QIWithRetranslateUI2<QIDialog>,
     30class VBoxCloseVMDlg : public QIWithRetranslateUI<QIDialog>,
    3131                       public Ui::VBoxCloseVMDlg
    3232{
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIMessageBox.cpp

    r11694 r12097  
    2727#include "QILabel.h"
    2828#include "QIDialogButtonBox.h"
     29#ifdef Q_WS_MAC
     30# include "VBoxConsoleWnd.h"
     31#endif /* Q_WS_MAC */
    2932
    3033/* Qt includes */
     
    4750                            QWidget *aParent, const char *aName, bool aModal)
    4851    : QIDialog (aParent,
    49                 Qt::Window | Qt::Sheet |
     52                Qt::Window |
    5053                Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
    5154{
     55#ifdef Q_WS_MAC
     56    /* Sheets are broken if the window is in fullscreen mode. So make it a
     57     * normal window in that case. */
     58    VBoxConsoleWnd *cwnd = qobject_cast<VBoxConsoleWnd*> (aParent);
     59    if (cwnd != NULL &&
     60        !cwnd->isTrueFullscreen() &&
     61        !cwnd->isTrueSeamless())
     62        setWindowFlags (windowFlags() | Qt::Sheet);
     63#endif /* Q_WS_MAC */
     64
     65
    5266    setWindowTitle (aCaption);
    5367    /* Necessary to later find some of the message boxes */
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxCloseVMDlg.cpp

    r11817 r12097  
    2323#include "VBoxCloseVMDlg.h"
    2424#include "VBoxProblemReporter.h"
     25#ifdef Q_WS_MAC
     26# include "VBoxConsoleWnd.h"
     27#endif /* Q_WS_MAC */
    2528
    2629/* Qt includes */
     
    2831
    2932VBoxCloseVMDlg::VBoxCloseVMDlg (QWidget *aParent)
    30     : QIWithRetranslateUI2<QIDialog> (aParent, Qt::Sheet)
     33    : QIWithRetranslateUI<QIDialog> (aParent)
    3134{
     35#ifdef Q_WS_MAC
     36    /* Sheets are broken if the window is in fullscreen mode. So make it a
     37     * normal window in that case. */
     38    VBoxConsoleWnd *cwnd = qobject_cast<VBoxConsoleWnd*> (aParent);
     39    if (cwnd != NULL &&
     40        !cwnd->isTrueFullscreen() &&
     41        !cwnd->isTrueSeamless())
     42        setWindowFlags (Qt::Sheet);
     43#endif /* Q_WS_MAC */
     44
    3245    /* Apply UI decorations */
    3346    Ui::VBoxCloseVMDlg::setupUi (this);
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