Changeset 57050 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 21, 2015 5:52:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r57048 r57050 123 123 } 124 124 125 void UIMachineWindowFullscreen::sltRevoke Focus()125 void UIMachineWindowFullscreen::sltRevokeWindowActivation() 126 126 { 127 127 /* Make sure window is visible: */ … … 129 129 return; 130 130 131 # if defined(Q_WS_WIN)132 /* Revoke stolen focus: */133 m_pMachineView->setFocus();134 # elif defined(Q_WS_X11)135 131 /* Revoke stolen activation: */ 136 132 activateWindow(); 137 # endif /* Q_WS_X11 */138 133 } 139 134 #endif /* Q_WS_WIN || Q_WS_X11 */ … … 257 252 connect(m_pMiniToolBar, SIGNAL(sigCloseAction()), 258 253 actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger())); 259 connect(m_pMiniToolBar, SIGNAL(sigNotifyAbout FocusStolen()),260 this, SLOT(sltRevoke Focus()), Qt::QueuedConnection);254 connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutWindowActivationStolen()), 255 this, SLOT(sltRevokeWindowActivation()), Qt::QueuedConnection); 261 256 } 262 257 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r57047 r57050 65 65 void sltMachineStateChanged(); 66 66 67 /** Revokes keyboard-focus. */68 void sltRevoke Focus();67 /** Revokes window activation. */ 68 void sltRevokeWindowActivation(); 69 69 #endif /* Q_WS_WIN || Q_WS_X11 */ 70 70 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r57048 r57050 64 64 } 65 65 66 void UIMachineWindowSeamless::sltRevoke Focus()66 void UIMachineWindowSeamless::sltRevokeWindowActivation() 67 67 { 68 68 /* Make sure window is visible: */ … … 70 70 return; 71 71 72 # if defined(Q_WS_WIN)73 /* Revoke stolen focus: */74 m_pMachineView->setFocus();75 # elif defined(Q_WS_X11)76 72 /* Revoke stolen activation: */ 77 73 activateWindow(); 78 # endif /* Q_WS_X11 */79 74 } 80 75 #endif /* Q_WS_WIN || Q_WS_X11 */ … … 139 134 connect(m_pMiniToolBar, SIGNAL(sigCloseAction()), 140 135 actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger())); 141 connect(m_pMiniToolBar, SIGNAL(sigNotifyAbout FocusStolen()),142 this, SLOT(sltRevoke Focus()), Qt::QueuedConnection);136 connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutWindowActivationStolen()), 137 this, SLOT(sltRevokeWindowActivation()), Qt::QueuedConnection); 143 138 } 144 139 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r57047 r57050 44 44 void sltMachineStateChanged(); 45 45 46 /** Revokes keyboard-focus. */47 void sltRevoke Focus();46 /** Revokes window activation. */ 47 void sltRevokeWindowActivation(); 48 48 #endif /* Q_WS_WIN || Q_WS_X11 */ 49 49 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r57047 r57050 543 543 void UIMiniToolBar::prepare() 544 544 { 545 #if defined (Q_WS_X11)546 545 /* Install own event-filter 547 * to handle focusstealing: */546 * to handle window activation stealing: */ 548 547 installEventFilter(this); 549 #endif /* Q_WS_X11 */550 548 551 549 #if defined(Q_WS_WIN) … … 605 603 /* Make sure we have no focus: */ 606 604 m_pEmbeddedToolbar->setFocusPolicy(Qt::NoFocus); 607 #ifdef Q_WS_WIN608 /* Install embedded-toolbar event-filter: */609 m_pEmbeddedToolbar->installEventFilter(this);610 #endif /* Q_WS_WIN */611 605 } 612 606 … … 683 677 bool UIMiniToolBar::eventFilter(QObject *pWatched, QEvent *pEvent) 684 678 { 685 #if defined(Q_WS_WIN) 686 /* Due to Qt bug QMdiArea can 687 * 1. steal focus from current application focus-widget 688 * 3. and even request focus stealing if QMdiArea hidden yet. 689 * We have to notify listeners about such facts.. */ 690 if (pWatched && m_pEmbeddedToolbar && pWatched == m_pEmbeddedToolbar && 691 pEvent->type() == QEvent::FocusIn) 692 emit sigNotifyAboutFocusStolen(); 693 #elif defined(Q_WS_X11) 694 /* Detect if we have window activation stolen. */ 695 if (pWatched == this && 696 pEvent->type() == QEvent::WindowActivate) 697 emit sigNotifyAboutFocusStolen(); 698 #endif /* Q_WS_X11 */ 679 /* Detect if we have window activation stolen: */ 680 if (pWatched == this && pEvent->type() == QEvent::WindowActivate) 681 emit sigNotifyAboutWindowActivationStolen(); 699 682 700 683 /* Call to base-class: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
r57047 r57050 61 61 void sigHoverLeave(); 62 62 63 /** Notifies listeners about we stole focus. */64 void sigNotifyAbout FocusStolen();63 /** Notifies listeners about we stole window activation. */ 64 void sigNotifyAboutWindowActivationStolen(); 65 65 66 66 public: … … 109 109 void sltHoverLeave(); 110 110 111 /** Notifies listeners about we stole focus. */112 void sltNotifyAbout FocusStolen() { emit sigNotifyAboutFocusStolen(); }111 /** Notifies listeners about we stole window activation. */ 112 void sltNotifyAboutWindowActivationStolen() { emit sigNotifyAboutWindowActivationStolen(); } 113 113 114 114 private:
Note:
See TracChangeset
for help on using the changeset viewer.