VirtualBox

Changeset 103539 in vbox


Ignore:
Timestamp:
Feb 22, 2024 6:27:15 PM (9 months ago)
Author:
vboxsync
Message:

FE/Qt: macOS: Runtime UI: Rework the way how machine-windows being restored from minimized state on Show action triggering; Removing obsolete Qt3 workaround dead for years from UIDefs.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r103538 r103539  
    4747    {
    4848        ActivateActionEventType = QEvent::User + 101,
    49 #ifdef VBOX_WS_MAC
    50         ShowWindowEventType,
    51 #endif
    5249    };
    5350
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r103538 r103539  
    680680{
    681681    for (int i=0; i < machineWindows().size(); ++i)
    682     {
    683         UIMachineWindow *pMachineWindow = machineWindows().at(i);
    684         /* Dunno what Qt thinks a window that has minimized to the dock
    685          * should be - it is not hidden, neither is it minimized. OTOH it is
    686          * marked shown and visible, but not activated. This latter isn't of
    687          * much help though, since at this point nothing is marked activated.
    688          * I might have overlooked something, but I'm buggered what if I know
    689          * what. So, I'll just always show & activate the stupid window to
    690          * make it get out of the dock when the user wishes to show a VM. */
    691         pMachineWindow->raise();
    692         pMachineWindow->activateWindow();
    693     }
     682        UIDesktopWidgetWatchdog::restoreWidget(machineWindows().at(i));
    694683}
    695684#endif /* VBOX_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r103538 r103539  
    17591759}
    17601760
    1761 bool UIMachineView::event(QEvent *pEvent)
    1762 {
    1763     switch ((UIEventType)pEvent->type())
    1764     {
    1765 #ifdef VBOX_WS_MAC
    1766         /* Event posted OnShowWindow: */
    1767         case ShowWindowEventType:
    1768         {
    1769             /* Dunno what Qt3 thinks a window that has minimized to the dock should be - it is not hidden,
    1770              * neither is it minimized. OTOH it is marked shown and visible, but not activated.
    1771              * This latter isn't of much help though, since at this point nothing is marked activated.
    1772              * I might have overlooked something, but I'm buggered what if I know what. So, I'll just always
    1773              * show & activate the stupid window to make it get out of the dock when the user wishes to show a VM: */
    1774             window()->show();
    1775             window()->activateWindow();
    1776             return true;
    1777         }
    1778 #endif /* VBOX_WS_MAC */
    1779 
    1780         default:
    1781             break;
    1782     }
    1783 
    1784     return QAbstractScrollArea::event(pEvent);
    1785 }
    1786 
    17871761bool UIMachineView::eventFilter(QObject *pWatched, QEvent *pEvent)
    17881762{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r100064 r103539  
    314314
    315315    /* Cross-platforms event processors: */
    316     bool event(QEvent *pEvent);
    317316    bool eventFilter(QObject *pWatched, QEvent *pEvent);
    318317    void resizeEvent(QResizeEvent *pEvent);
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