Changeset 100064 in vbox
- Timestamp:
- Jun 4, 2023 9:10:01 AM (18 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r99941 r100064 115 115 endif 116 116 VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT 117 VirtualBox_DEFS.linux = VBOX_WS_ X11QT_NO_DEPRECATED_WARNINGS118 VirtualBox_DEFS.solaris = VBOX_WS_ X11119 VirtualBox_DEFS.freebsd = VBOX_WS_ X11117 VirtualBox_DEFS.linux = VBOX_WS_NIX QT_NO_DEPRECATED_WARNINGS 118 VirtualBox_DEFS.solaris = VBOX_WS_NIX 119 VirtualBox_DEFS.freebsd = VBOX_WS_NIX 120 120 VirtualBox_DEFS.darwin = VBOX_WS_MAC 121 121 VirtualBox_DEFS.win = VBOX_WS_WIN … … 177 177 endif 178 178 VirtualBoxVM_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT 179 VirtualBoxVM_DEFS.linux = VBOX_WS_ X11QT_NO_DEPRECATED_WARNINGS180 VirtualBoxVM_DEFS.solaris = VBOX_WS_ X11181 VirtualBoxVM_DEFS.freebsd = VBOX_WS_ X11179 VirtualBoxVM_DEFS.linux = VBOX_WS_NIX QT_NO_DEPRECATED_WARNINGS 180 VirtualBoxVM_DEFS.solaris = VBOX_WS_NIX 181 VirtualBoxVM_DEFS.freebsd = VBOX_WS_NIX 182 182 VirtualBoxVM_DEFS.darwin = VBOX_WS_MAC 183 183 VirtualBoxVM_DEFS.win = VBOX_WS_WIN … … 237 237 endif 238 238 UICommon_DEFS.darwin = VBOX_WS_MAC 239 UICommon_DEFS.freebsd = VBOX_WS_ X11240 UICommon_DEFS.linux = VBOX_WS_ X11QT_NO_DEPRECATED_WARNINGS241 UICommon_DEFS.solaris = VBOX_WS_ X11239 UICommon_DEFS.freebsd = VBOX_WS_NIX 240 UICommon_DEFS.linux = VBOX_WS_NIX QT_NO_DEPRECATED_WARNINGS 241 UICommon_DEFS.solaris = VBOX_WS_NIX 242 242 UICommon_DEFS.win = VBOX_WS_WIN 243 243 UICommon_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r98999 r100064 813 813 case UIExtraDataMetaDefs::RuntimeMenuInputActionType_SoftKeyboard: strResult = "SoftKeyboard"; break; 814 814 case UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD: strResult = "TypeCAD"; break; 815 #ifdef VBOX_WS_ X11815 #ifdef VBOX_WS_NIX 816 816 case UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS: strResult = "TypeCABS"; break; 817 #endif /* VBOX_WS_ X11*/817 #endif /* VBOX_WS_NIX */ 818 818 case UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak: strResult = "TypeCtrlBreak"; break; 819 819 case UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert: strResult = "TypeInsert"; break; … … 845 845 if (strRuntimeMenuInputActionType.compare("TypeCAD", Qt::CaseInsensitive) == 0) 846 846 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD; 847 #ifdef VBOX_WS_ X11847 #ifdef VBOX_WS_NIX 848 848 if (strRuntimeMenuInputActionType.compare("TypeCABS", Qt::CaseInsensitive) == 0) 849 849 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS; 850 #endif /* VBOX_WS_ X11*/850 #endif /* VBOX_WS_NIX */ 851 851 if (strRuntimeMenuInputActionType.compare("TypeCtrlBreak", Qt::CaseInsensitive) == 0) 852 852 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak; -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIProcess.cpp
r98103 r100064 30 30 31 31 /* External includes: */ 32 #ifdef VBOX_WS_ X1132 #ifdef VBOX_WS_NIX 33 33 # include <sys/wait.h> 34 34 #endif … … 62 62 result = process.readAllStandardOutput(); 63 63 process.setProcessState(QProcess::NotRunning); 64 #ifdef VBOX_WS_ X1164 #ifdef VBOX_WS_NIX 65 65 int iStatus; 66 66 if (process.processId() > 0) 67 67 waitpid(process.processId(), &iStatus, 0); 68 #endif /* VBOX_WS_ X11*/68 #endif /* VBOX_WS_NIX */ 69 69 return result; 70 70 } -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r99184 r100064 180 180 const char *UIExtraDataDefs::GUI_Seamless = "GUI/Seamless"; 181 181 const char *UIExtraDataDefs::GUI_Scale = "GUI/Scale"; 182 #ifdef VBOX_WS_ X11182 #ifdef VBOX_WS_NIX 183 183 const char *UIExtraDataDefs::GUI_Fullscreen_LegacyMode = "GUI/Fullscreen/LegacyMode"; 184 184 const char *UIExtraDataDefs::GUI_DistinguishMachineWindowGroups = "GUI/DistinguishMachineWindowGroups"; 185 #endif /* VBOX_WS_ X11*/185 #endif /* VBOX_WS_NIX */ 186 186 const char *UIExtraDataDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest"; 187 187 const char *UIExtraDataDefs::GUI_LastVisibilityStatusForGuestScreen = "GUI/LastVisibilityStatusForGuestScreen"; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r99184 r100064 331 331 /** Holds whether scaled visual-state is requested. */ 332 332 SHARED_LIBRARY_STUFF extern const char *GUI_Scale; 333 #ifdef VBOX_WS_ X11333 #ifdef VBOX_WS_NIX 334 334 /** Holds whether legacy full-screen mode is requested. */ 335 335 SHARED_LIBRARY_STUFF extern const char *GUI_Fullscreen_LegacyMode; 336 336 /** Holds whether internal machine-window names should be unique. */ 337 337 SHARED_LIBRARY_STUFF extern const char *GUI_DistinguishMachineWindowGroups; 338 #endif /* VBOX_WS_ X11*/338 #endif /* VBOX_WS_NIX */ 339 339 /** Holds whether guest-screen auto-resize according machine-window size is enabled. */ 340 340 SHARED_LIBRARY_STUFF extern const char *GUI_AutoresizeGuest; … … 643 643 RuntimeMenuInputActionType_SoftKeyboard = RT_BIT(2), 644 644 RuntimeMenuInputActionType_TypeCAD = RT_BIT(3), 645 #ifdef VBOX_WS_ X11645 #ifdef VBOX_WS_NIX 646 646 RuntimeMenuInputActionType_TypeCABS = RT_BIT(4), 647 647 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r99946 r100064 1977 1977 << GUI_RestrictedVisualStates 1978 1978 << GUI_Fullscreen << GUI_Seamless << GUI_Scale 1979 #ifdef VBOX_WS_ X111979 #ifdef VBOX_WS_NIX 1980 1980 << GUI_Fullscreen_LegacyMode 1981 1981 << GUI_DistinguishMachineWindowGroups … … 2600 2600 #elif defined (VBOX_WS_WIN) 2601 2601 strHostCombo = "163"; // VK_RCONTROL 2602 #elif defined (VBOX_WS_ X11)2602 #elif defined (VBOX_WS_NIX) 2603 2603 strHostCombo = "65508"; // XK_Control_R 2604 2604 #else … … 2655 2655 if (strAutoCapture.isEmpty()) 2656 2656 { 2657 #if defined(VBOX_WS_ X11) && defined(DEBUG)2657 #if defined(VBOX_WS_NIX) && defined(DEBUG) 2658 2658 fAutoCapture = false; 2659 2659 #else … … 3834 3834 } 3835 3835 3836 #ifdef VBOX_WS_ X113836 #ifdef VBOX_WS_NIX 3837 3837 bool UIExtraDataManager::legacyFullscreenModeRequested() 3838 3838 { … … 3852 3852 setExtraDataString(GUI_DistinguishMachineWindowGroups, toFeatureAllowed(fEnabled), uID); 3853 3853 } 3854 #endif /* VBOX_WS_ X11*/3854 #endif /* VBOX_WS_NIX */ 3855 3855 3856 3856 bool UIExtraDataManager::guestScreenAutoResizeEnabled(const QUuid &uID) … … 4827 4827 else if (strKey == GUI_CloudConsoleManager_Restrictions) 4828 4828 emit sigCloudConsoleManagerRestrictionChange(); 4829 #if defined(VBOX_WS_ X11) || defined(VBOX_WS_WIN)4829 #if defined(VBOX_WS_NIX) || defined(VBOX_WS_WIN) 4830 4830 else if (strKey == GUI_DisableHostScreenSaver) 4831 4831 emit sigDisableHostScreenSaverStateChange(isFeatureAllowed(GUI_DisableHostScreenSaver)); -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r99184 r100064 134 134 #endif /* VBOX_WS_MAC */ 135 135 136 #if defined (VBOX_WS_ X11) || defined (VBOX_WS_WIN)136 #if defined (VBOX_WS_NIX) || defined (VBOX_WS_WIN) 137 137 /* Is emitted when host screen saver inhibition state changes. */ 138 138 void sigDisableHostScreenSaverStateChange(bool fDisable); … … 612 612 void setRequestedVisualState(UIVisualStateType visualState, const QUuid &uID); 613 613 614 #ifdef VBOX_WS_ X11614 #ifdef VBOX_WS_NIX 615 615 /** Returns whether legacy full-screen mode is requested. */ 616 616 bool legacyFullscreenModeRequested(); … … 620 620 /** Defines whether internal machine-window name should be unique. */ 621 621 void setDistinguishMachineWindowGroups(const QUuid &uID, bool fEnabled); 622 #endif /* VBOX_WS_ X11*/622 #endif /* VBOX_WS_NIX */ 623 623 624 624 /** Returns whether guest-screen auto-resize according machine-window size is enabled. */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRestorableGeometry.h
r98103 r100064 42 42 # include "VBoxUtils-darwin.h" 43 43 #endif 44 #ifdef VBOX_WS_ X1144 #ifdef VBOX_WS_NIX 45 45 # include "UICommon.h" 46 46 # include "UIDesktopWidgetWatchdog.h" … … 71 71 QMainWindow::moveEvent(pEvent); 72 72 73 #ifdef VBOX_WS_ X1173 #ifdef VBOX_WS_NIX 74 74 /* Prevent further handling if fake screen detected: */ 75 75 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) … … 96 96 QMainWindow::resizeEvent(pEvent); 97 97 98 #ifdef VBOX_WS_ X1198 #ifdef VBOX_WS_NIX 99 99 /* Prevent handling if fake screen detected: */ 100 100 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r98103 r100064 1694 1694 }; 1695 1695 1696 #ifdef VBOX_WS_ X111696 #ifdef VBOX_WS_NIX 1697 1697 /** X11: Simple action extension, used as 'Perform Type CABS' action class. */ 1698 1698 class UIActionSimpleRuntimePerformTypeCABS : public UIActionSimple … … 1744 1744 } 1745 1745 }; 1746 #endif /* VBOX_WS_ X11*/1746 #endif /* VBOX_WS_NIX */ 1747 1747 1748 1748 /** Simple action extension, used as 'Perform Type Ctrl Break' action class. */ … … 3347 3347 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_SoftKeyboard] = new UIActionSimpleRuntimeShowSoftKeyboard(this); 3348 3348 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD] = new UIActionSimpleRuntimePerformTypeCAD(this); 3349 #ifdef VBOX_WS_ X113349 #ifdef VBOX_WS_NIX 3350 3350 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS] = new UIActionSimpleRuntimePerformTypeCABS(this); 3351 #endif /* VBOX_WS_ X11*/3351 #endif /* VBOX_WS_NIX */ 3352 3352 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_TypeCtrlBreak] = new UIActionSimpleRuntimePerformTypeCtrlBreak(this); 3353 3353 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_TypeInsert] = new UIActionSimpleRuntimePerformTypeInsert(this); … … 4236 4236 /* 'Type CAD' action: */ 4237 4237 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD)) || fSeparator; 4238 #ifdef VBOX_WS_ X114238 #ifdef VBOX_WS_NIX 4239 4239 /* 'Type CABS' action: */ 4240 4240 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS)) || fSeparator; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.h
r98103 r100064 94 94 UIActionIndexRT_M_Input_M_Keyboard_S_SoftKeyboard, 95 95 UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD, 96 #ifdef VBOX_WS_ X1196 #ifdef VBOX_WS_NIX 97 97 UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS, 98 98 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r100033 r100064 88 88 # include "VBoxUtils-win.h" 89 89 #endif 90 #ifdef VBOX_WS_ X1190 #ifdef VBOX_WS_NIX 91 91 # include "UIHostComboEditor.h" 92 92 #endif … … 142 142 # include <sys/utsname.h> 143 143 #endif 144 #ifdef VBOX_WS_ X11144 #ifdef VBOX_WS_NIX 145 145 # include <xcb/xcb.h> 146 146 #endif … … 189 189 , m_fDataCommitted(false) 190 190 #endif 191 #ifdef VBOX_WS_ X11191 #ifdef VBOX_WS_NIX 192 192 , m_enmWindowManagerType(X11WMType_Unknown) 193 193 , m_fCompositingManagerRunning(false) … … 243 243 #endif /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 244 244 245 #ifdef VBOX_WS_ X11245 #ifdef VBOX_WS_NIX 246 246 /* Detect display server type: */ 247 247 m_enmDisplayServerType = VBGHDisplayServerTypeDetect(); … … 329 329 UIVisualStateType visualStateType = UIVisualStateType_Invalid; 330 330 331 #ifdef VBOX_WS_ X11331 #ifdef VBOX_WS_NIX 332 332 /* Check whether we have compositing manager running: */ 333 333 m_fCompositingManagerRunning = NativeWindowSubsystem::isCompositingManagerRunning(X11ServerAvailable()); … … 335 335 /* Acquire current Window Manager type: */ 336 336 m_enmWindowManagerType = NativeWindowSubsystem::windowManagerType(X11ServerAvailable()); 337 #endif /* VBOX_WS_ X11*/337 #endif /* VBOX_WS_NIX */ 338 338 339 339 #ifdef VBOX_WITH_DEBUGGER_GUI … … 1201 1201 return true; 1202 1202 1203 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)1203 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 1204 1204 1205 1205 return UIDesktopWidgetWatchdog::activateWindow(id, true); … … 1288 1288 AllowSetForegroundWindow(ASFW_ANY); 1289 1289 #endif 1290 #ifdef VBOX_WS_ X111290 #ifdef VBOX_WS_NIX 1291 1291 /* Make sure VM process will start on the same 1292 1292 * display as window this wrapper is called from: */ … … 2779 2779 refreshMedia(); 2780 2780 2781 #ifdef VBOX_WS_ X112781 #ifdef VBOX_WS_NIX 2782 2782 // WORKAROUND: 2783 2783 // As X11 do not have functionality for providing human readable key names, … … 3032 3032 } 3033 3033 3034 #ifdef VBOX_WS_ X113034 #ifdef VBOX_WS_NIX 3035 3035 bool UICommon::X11ServerAvailable() const 3036 3036 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r100027 r100064 41 41 #include "UILibraryDefs.h" 42 42 #include "UIMediumDefs.h" 43 #ifdef VBOX_WS_ X1143 #ifdef VBOX_WS_NIX 44 44 # include "VBoxUtils-nix.h" 45 45 #endif … … 212 212 #endif 213 213 214 #ifdef VBOX_WS_ X11214 #ifdef VBOX_WS_NIX 215 215 /** X11: Returns the type of the Window Manager we are running under. */ 216 216 X11WMType typeOfWindowManager() const { return m_enmWindowManagerType; } … … 656 656 /** @name Host OS stuff. 657 657 * @{ */ 658 #ifdef VBOX_WS_ X11658 #ifdef VBOX_WS_NIX 659 659 /** X11: Holds the #X11WMType of the Window Manager we are running under. */ 660 660 X11WMType m_enmWindowManagerType; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICursor.cpp
r99438 r100064 41 41 return; 42 42 43 #ifdef VBOX_WS_ X1143 #ifdef VBOX_WS_NIX 44 44 /* As reported in https://www.virtualbox.org/ticket/16348, 45 45 * in X11 QWidget::setCursor(..) call uses RENDER … … 67 67 return; 68 68 69 #ifdef VBOX_WS_ X1169 #ifdef VBOX_WS_NIX 70 70 /* As reported in https://www.virtualbox.org/ticket/16348, 71 71 * in X11 QGraphicsWidget::setCursor(..) call uses RENDER … … 93 93 return; 94 94 95 #ifdef VBOX_WS_ X1195 #ifdef VBOX_WS_NIX 96 96 /* As reported in https://www.virtualbox.org/ticket/16348, 97 97 * in X11 QWidget::unsetCursor(..) call uses RENDER … … 119 119 return; 120 120 121 #ifdef VBOX_WS_ X11121 #ifdef VBOX_WS_NIX 122 122 /* As reported in https://www.virtualbox.org/ticket/16348, 123 123 * in X11 QGraphicsWidget::unsetCursor(..) call uses RENDER -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
r99479 r100064 33 33 # include <QLibrary> 34 34 #endif 35 #ifdef VBOX_WS_ X1135 #ifdef VBOX_WS_NIX 36 36 # include <QTimer> 37 37 #endif … … 48 48 # include "VBoxUtils-win.h" 49 49 #endif 50 #ifdef VBOX_WS_ X1150 #ifdef VBOX_WS_NIX 51 51 # include "UICommon.h" 52 52 # include "VBoxUtils-nix.h" … … 67 67 /* External includes: */ 68 68 #include <math.h> 69 #ifdef VBOX_WS_ X1169 #ifdef VBOX_WS_NIX 70 70 # include <xcb/xcb.h> 71 71 #endif … … 122 122 123 123 124 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)124 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 125 125 126 126 /** QWidget extension used as … … 252 252 } 253 253 254 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */254 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 255 255 256 256 … … 287 287 288 288 UIDesktopWidgetWatchdog::UIDesktopWidgetWatchdog() 289 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)289 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 290 290 : m_enmSynthTestPolicy(DesktopWatchdogPolicy_SynthTest_Both) 291 291 #endif … … 382 382 QRect UIDesktopWidgetWatchdog::availableGeometry(QScreen *pScreen) const 383 383 { 384 #ifdef VBOX_WS_ X11384 #ifdef VBOX_WS_NIX 385 385 # ifdef VBOX_GUI_WITH_CUSTOMIZATIONS1 386 386 // WORKAROUND: … … 394 394 return availableGeometry.isValid() ? availableGeometry : screenGeometry(pScreen); 395 395 # endif /* !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 396 #else /* !VBOX_WS_ X11*/396 #else /* !VBOX_WS_NIX */ 397 397 /* Just return screen available-geometry: */ 398 398 return pScreen->availableGeometry(); 399 #endif /* !VBOX_WS_ X11*/399 #endif /* !VBOX_WS_NIX */ 400 400 } 401 401 … … 471 471 } 472 472 473 #ifdef VBOX_WS_ X11473 #ifdef VBOX_WS_NIX 474 474 /* static */ 475 475 bool UIDesktopWidgetWatchdog::isFakeScreenDetected() … … 484 484 || (qApp->screens().size() == 1 && qApp->screens().first()->name() == ":0.0"); 485 485 } 486 #endif /* VBOX_WS_ X11*/486 #endif /* VBOX_WS_NIX */ 487 487 488 488 /* static */ … … 788 788 { 789 789 AssertPtrReturnVoid(pWidget); 790 #ifdef VBOX_WS_ X11790 #ifdef VBOX_WS_NIX 791 791 # define QWINDOWSIZE_MAX ((1<<24)-1) 792 792 if (pWidget->isWindow() && pWidget->isVisible() && uiCommon().X11ServerAvailable()) … … 839 839 // Configure event will arrive to tell Qt what geometry we want. 840 840 pWidget->setGeometry(x, y, w, h); 841 # else /* !VBOX_WS_ X11*/841 # else /* !VBOX_WS_NIX */ 842 842 pWidget->setGeometry(x, y, w, h); 843 # endif /* !VBOX_WS_ X11*/843 # endif /* !VBOX_WS_NIX */ 844 844 } 845 845 … … 860 860 fResult &= NativeWindowSubsystem::WinActivateWindow(wId, fSwitchDesktop); 861 861 862 #elif defined(VBOX_WS_ X11)862 #elif defined(VBOX_WS_NIX) 863 863 864 864 fResult &= NativeWindowSubsystem::activateWindow(uiCommon().X11ServerAvailable(), wId, fSwitchDesktop); … … 889 889 this, &UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized); 890 890 891 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)891 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 892 892 /* Update host-screen configuration: */ 893 893 updateHostScreenConfiguration(); 894 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */894 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 895 895 896 896 /* Notify listeners: */ … … 908 908 this, &UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized); 909 909 910 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)910 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 911 911 /* Update host-screen configuration: */ 912 912 updateHostScreenConfiguration(); 913 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */913 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 914 914 915 915 /* Notify listeners: */ … … 931 931 geometry.width(), geometry.height())); 932 932 933 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)933 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 934 934 /* Update host-screen available-geometry: */ 935 935 updateHostScreenAvailableGeometry(iHostScreenIndex); 936 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */936 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 937 937 938 938 /* Notify listeners: */ … … 954 954 availableGeometry.width(), availableGeometry.height())); 955 955 956 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)956 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 957 957 /* Update host-screen available-geometry: */ 958 958 updateHostScreenAvailableGeometry(iHostScreenIndex); 959 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */959 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 960 960 961 961 /* Notify listeners: */ … … 963 963 } 964 964 965 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)965 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 966 966 void UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated(int iHostScreenIndex, QRect availableGeometry) 967 967 { … … 984 984 emit sigHostScreenWorkAreaRecalculated(iHostScreenIndex); 985 985 } 986 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */986 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 987 987 988 988 void UIDesktopWidgetWatchdog::prepare() … … 1001 1001 } 1002 1002 1003 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)1003 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 1004 1004 /* Load Synthetic Test policy: */ 1005 1005 const QString strSynthTestPolicy = QString::fromLocal8Bit(qgetenv(VBox_DesktopWatchdogPolicy_SynthTest)); … … 1008 1008 /* Update host-screen configuration: */ 1009 1009 updateHostScreenConfiguration(); 1010 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */1010 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 1011 1011 } 1012 1012 … … 1026 1026 } 1027 1027 1028 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)1028 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 1029 1029 /* Cleanup existing workers finally: */ 1030 1030 cleanupExistingWorkers(); 1031 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */1031 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 1032 1032 } 1033 1033 … … 1060 1060 } 1061 1061 1062 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)1062 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 1063 1063 bool UIDesktopWidgetWatchdog::isSynchTestRestricted() const 1064 1064 { … … 1141 1141 1142 1142 # include "UIDesktopWidgetWatchdog.moc" 1143 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */1143 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
r98999 r100064 35 35 #include <QObject> 36 36 #include <QWindow> 37 #ifdef VBOX_WS_ X1137 #ifdef VBOX_WS_NIX 38 38 # include <QRect> 39 39 # include <QVector> … … 42 42 /* GUI includes: */ 43 43 #include "UILibraryDefs.h" 44 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)44 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 45 45 # include "UIDefs.h" 46 46 #endif … … 71 71 void sigHostScreenWorkAreaResized(int iHostScreenIndex); 72 72 73 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)73 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 74 74 /** Notifies about work-area recalculated for the host-screen with @a iHostScreenIndex. */ 75 75 void sigHostScreenWorkAreaRecalculated(int iHostScreenIndex); … … 121 121 static QRegion overallAvailableRegion(); 122 122 123 #ifdef VBOX_WS_ X11123 #ifdef VBOX_WS_NIX 124 124 /** Qt5: X11: Returns whether no or fake screen detected. */ 125 125 static bool isFakeScreenDetected(); … … 175 175 void sltHandleHostScreenWorkAreaResized(const QRect &availableGeometry); 176 176 177 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)177 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 178 178 /** Handles @a availableGeometry calculation result for the host-screen with @a iHostScreenIndex. */ 179 179 void sltHandleHostScreenAvailableGeometryCalculated(int iHostScreenIndex, QRect availableGeometry); … … 196 196 static UIDesktopWidgetWatchdog *s_pInstance; 197 197 198 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)198 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 199 199 /** Returns whether Synthetic Test is restricted according to cached policy. */ 200 200 bool isSynchTestRestricted() const; … … 217 217 /** Holds current workers determining host-screen available-geometries. */ 218 218 QVector<QWidget*> m_availableGeometryWorkers; 219 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */219 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 220 220 }; 221 221 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r99946 r100064 513 513 QString err = tr("<p>Failed to acquire the VirtualBox COM object.</p>" 514 514 "<p>The application will now terminate.</p>"); 515 #if defined(VBOX_WS_ X11) || defined(VBOX_WS_MAC)515 #if defined(VBOX_WS_NIX) || defined(VBOX_WS_MAC) 516 516 if (comClient.lastRC() == NS_ERROR_SOCKET_FAIL) 517 517 err += tr("<p>The reason for this error are most likely wrong permissions of the IPC " -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r99910 r100064 1983 1983 void UIHelpBrowserWidget::sltShowPrintDialog() 1984 1984 { 1985 #ifdef VBOX_WS_ X111985 #ifdef VBOX_WS_NIX 1986 1986 if (!m_pTabManager) 1987 1987 return; -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r99836 r100064 29 29 #include <QApplication> 30 30 #include <QMessageBox> 31 #ifdef VBOX_WS_ X1131 #ifdef VBOX_WS_NIX 32 32 # ifndef Q_OS_SOLARIS 33 33 # include <QFontDatabase> … … 56 56 # endif 57 57 #endif 58 #ifdef VBOX_WS_ X1158 #ifdef VBOX_WS_NIX 59 59 # include <iprt/env.h> 60 60 #endif … … 71 71 # include <sys/mman.h> 72 72 #endif /* VBOX_WS_MAC */ 73 #ifdef VBOX_WS_ X1173 #ifdef VBOX_WS_NIX 74 74 # include <dlfcn.h> 75 75 # include <unistd.h> … … 89 89 # endif /* !RT_ARCH_AMD64 */ 90 90 # endif /* RT_OS_LINUX && DEBUG */ 91 #endif /* VBOX_WS_ X11*/91 #endif /* VBOX_WS_NIX */ 92 92 93 93 … … 135 135 136 136 137 #ifdef VBOX_WS_ X11137 #ifdef VBOX_WS_NIX 138 138 /** X11: For versions of Xlib which are aware of multi-threaded environments this function 139 139 * calls for XInitThreads() which initializes Xlib support for concurrent threads. … … 206 206 } 207 207 # endif /* RT_OS_LINUX && DEBUG */ 208 #endif /* VBOX_WS_ X11*/208 #endif /* VBOX_WS_NIX */ 209 209 210 210 /** Qt5 message handler, function that prints out … … 216 216 { 217 217 NOREF(context); 218 # ifndef VBOX_WS_ X11218 # ifndef VBOX_WS_NIX 219 219 NOREF(strMessage); 220 220 # endif … … 226 226 case QtWarningMsg: 227 227 Log(("Qt WARNING: %s\n", strMessage.toUtf8().constData())); 228 # ifdef VBOX_WS_ X11228 # ifdef VBOX_WS_NIX 229 229 /* Needed for instance for the message ``cannot connect to X server'': */ 230 230 RTStrmPrintf(g_pStdErr, "Qt WARNING: %s\n", strMessage.toUtf8().constData()); … … 233 233 case QtCriticalMsg: 234 234 Log(("Qt CRITICAL: %s\n", strMessage.toUtf8().constData())); 235 # ifdef VBOX_WS_ X11235 # ifdef VBOX_WS_NIX 236 236 /* Needed for instance for the message ``cannot connect to X server'': */ 237 237 RTStrmPrintf(g_pStdErr, "Qt CRITICAL: %s\n", strMessage.toUtf8().constData()); … … 240 240 case QtFatalMsg: 241 241 Log(("Qt FATAL: %s\n", strMessage.toUtf8().constData())); 242 # ifdef VBOX_WS_ X11242 # ifdef VBOX_WS_NIX 243 243 /* Needed for instance for the message ``cannot connect to X server'': */ 244 244 RTStrmPrintf(g_pStdErr, "Qt FATAL: %s\n", strMessage.toUtf8().constData()); … … 392 392 do 393 393 { 394 #ifdef VBOX_WS_ X11394 #ifdef VBOX_WS_NIX 395 395 /* Make sure multi-threaded environment is safe: */ 396 396 if (!MakeSureMultiThreadingIsSafe()) … … 406 406 /* Assume pure Wayland (without a X server):*/ 407 407 RTEnvSet("QT_QPA_PLATFORM", "wayland"); 408 #endif /* VBOX_WS_ X11*/408 #endif /* VBOX_WS_NIX */ 409 409 410 410 /* Console help preprocessing: */ … … 453 453 #endif /* VBOX_WS_MAC */ 454 454 455 #ifdef VBOX_WS_ X11455 #ifdef VBOX_WS_NIX 456 456 # if defined(RT_OS_LINUX) && defined(DEBUG) 457 457 /* Install signal handler to backtrace the call stack: */ 458 458 InstallSignalHandler(); 459 459 # endif /* RT_OS_LINUX && DEBUG */ 460 #endif /* VBOX_WS_ X11*/460 #endif /* VBOX_WS_NIX */ 461 461 462 462 /* Install Qt console message handler: */ … … 492 492 #endif /* VBOX_WS_WIN */ 493 493 494 #ifdef VBOX_WS_ X11494 #ifdef VBOX_WS_NIX 495 495 /* Make all widget native. 496 496 * We did it to avoid various Qt crashes while testing widget attributes or acquiring winIds. … … 526 526 break; 527 527 } 528 #endif /* VBOX_WS_ X11*/528 #endif /* VBOX_WS_NIX */ 529 529 530 530 /* Create modal-window manager: */ … … 638 638 int main(int argc, char **argv, char **envp) 639 639 { 640 # ifdef VBOX_WS_ X11640 # ifdef VBOX_WS_NIX 641 641 /* Make sure multi-threaded environment is safe: */ 642 642 if (!MakeSureMultiThreadingIsSafe()) 643 643 return 1; 644 # endif /* VBOX_WS_ X11*/644 # endif /* VBOX_WS_NIX */ 645 645 646 646 /* … … 857 857 } 858 858 859 # ifdef VBOX_WS_ X11859 # ifdef VBOX_WS_NIX 860 860 /* We have to to make sure that we display the error-message 861 861 * after the parent displayed its own message. */ 862 862 sleep(2); 863 # endif /* VBOX_WS_ X11*/863 # endif /* VBOX_WS_NIX */ 864 864 865 865 /* Update strText with strDetails: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r100027 r100064 92 92 # include "UIMenuBar.h" 93 93 #endif 94 #ifdef VBOX_WS_ X1194 #ifdef VBOX_WS_NIX 95 95 # include "UIDesktopWidgetWatchdog.h" 96 96 #endif … … 623 623 } 624 624 625 #ifdef VBOX_WS_ X11625 #ifdef VBOX_WS_NIX 626 626 void UIVirtualBoxManager::sltHandleHostScreenAvailableAreaChange() 627 627 { … … 635 635 move(geo.topLeft()); 636 636 } 637 #endif /* VBOX_WS_ X11*/637 #endif /* VBOX_WS_NIX */ 638 638 639 639 void UIVirtualBoxManager::sltHandleCommitData() … … 1525 1525 /* Execute console application finally: */ 1526 1526 QProcess::startDetached(QString("%1 %2").arg(strPath, arguments.join(' '))); 1527 #elif defined(VBOX_WS_ X11)1527 #elif defined(VBOX_WS_NIX) 1528 1528 /* Gather arguments: */ 1529 1529 QStringList arguments; … … 1533 1533 /* Execute console application finally: */ 1534 1534 QProcess::startDetached(strPath, arguments); 1535 #endif /* VBOX_WS_ X11*/1535 #endif /* VBOX_WS_NIX */ 1536 1536 } 1537 1537 … … 2155 2155 void UIVirtualBoxManager::prepare() 2156 2156 { 2157 #ifdef VBOX_WS_ X112157 #ifdef VBOX_WS_NIX 2158 2158 NativeWindowSubsystem::setWMClass(uiCommon().X11ServerAvailable(), this, "VirtualBox Manager", "VirtualBox Manager"); 2159 2159 #endif … … 2283 2283 void UIVirtualBoxManager::prepareConnections() 2284 2284 { 2285 #ifdef VBOX_WS_ X112285 #ifdef VBOX_WS_NIX 2286 2286 /* Desktop event handlers: */ 2287 2287 connect(gpDesktop, &UIDesktopWidgetWatchdog::sigHostScreenWorkAreaResized, … … 3132 3132 #elif defined(VBOX_WS_WIN) 3133 3133 pDefaultAction->setProperty("path", "powershell"); 3134 #elif defined(VBOX_WS_ X11)3134 #elif defined(VBOX_WS_NIX) 3135 3135 const QPair<QString, QString> terminalData = defaultTerminalData(); 3136 3136 pDefaultAction->setProperty("path", terminalData.first); … … 3859 3859 } 3860 3860 3861 #ifdef VBOX_WS_ X113861 #ifdef VBOX_WS_NIX 3862 3862 /* static */ 3863 3863 QPair<QString, QString> UIVirtualBoxManager::defaultTerminalData() -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r100027 r100064 127 127 /** @name Common stuff. 128 128 * @{ */ 129 #ifdef VBOX_WS_ X11129 #ifdef VBOX_WS_NIX 130 130 /** Handles host-screen available-area change. */ 131 131 void sltHandleHostScreenAvailableAreaChange(); … … 490 490 static bool isAtLeastOneItemDetachable(const QList<UIVirtualMachineItem*> &items); 491 491 492 #ifdef VBOX_WS_ X11492 #ifdef VBOX_WS_NIX 493 493 /** Tries to guess default X11 terminal emulator. 494 494 * @returns Data packed into Qt pair of QString(s), -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r99664 r100064 81 81 82 82 /* Other VBox stuff: */ 83 #ifdef VBOX_WS_ X1183 #ifdef VBOX_WS_NIX 84 84 # include <iprt/env.h> 85 85 #endif … … 2202 2202 AllowSetForegroundWindow(ASFW_ANY); 2203 2203 #endif 2204 #ifdef VBOX_WS_ X112204 #ifdef VBOX_WS_NIX 2205 2205 /* Make sure VM process will start on the same 2206 2206 * display as the VirtualBox Manager: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r99936 r100064 58 58 /* Other includes: */ 59 59 #include <math.h> 60 #ifdef VBOX_WS_ X1160 #ifdef VBOX_WS_NIX 61 61 # include <X11/Xlib.h> 62 62 # undef Bool // Qt5 vs Xlib gift.. 63 #endif /* VBOX_WS_ X11*/63 #endif /* VBOX_WS_NIX */ 64 64 65 65 … … 453 453 m_iWinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0; 454 454 455 #ifdef VBOX_WS_ X11455 #ifdef VBOX_WS_NIX 456 456 if (uiCommon().X11ServerAvailable()) 457 457 /* Resync Qt and X11 Server (see xTracker #7547). */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r99838 r100064 69 69 # include "WinKeyboard.h" 70 70 #endif 71 #ifdef VBOX_WS_ X1171 #ifdef VBOX_WS_NIX 72 72 # include "XKeyboard.h" 73 73 # include "VBoxUtils-nix.h" … … 83 83 # include <Carbon/Carbon.h> 84 84 #endif 85 #ifdef VBOX_WS_ X1185 #ifdef VBOX_WS_NIX 86 86 # include <X11/XKBlib.h> 87 87 # include <X11/keysym.h> … … 97 97 # endif /* KeyPress */ 98 98 # include <xcb/xcb.h> 99 #endif /* VBOX_WS_ X11*/99 #endif /* VBOX_WS_NIX */ 100 100 101 101 /* Enums representing different keyboard-states: */ … … 265 265 * S.a. UIKeyboardHandler::eventFilter for more information. */ 266 266 267 #elif defined(VBOX_WS_ X11)267 #elif defined(VBOX_WS_NIX) 268 268 if (uiCommon().X11ServerAvailable()) 269 269 { … … 370 370 * S.a. UIKeyboardHandler::eventFilter for more information. */ 371 371 372 #elif defined(VBOX_WS_ X11)372 #elif defined(VBOX_WS_NIX) 373 373 if (uiCommon().X11ServerAvailable()) 374 374 { … … 819 819 } 820 820 821 # elif defined(VBOX_WS_ X11)821 # elif defined(VBOX_WS_NIX) 822 822 if (uiCommon().X11ServerAvailable()) 823 823 { … … 999 999 , m_keyboardHook(NULL) 1000 1000 , m_pAltGrMonitor(0) 1001 #elif defined(VBOX_WS_ X11)1001 #elif defined(VBOX_WS_NIX) 1002 1002 , m_hButtonGrabWindow(0) 1003 #endif /* VBOX_WS_ X11*/1003 #endif /* VBOX_WS_NIX */ 1004 1004 { 1005 1005 /* Prepare: */ … … 1038 1038 { 1039 1039 /* Global settings: */ 1040 #ifdef VBOX_WS_ X111040 #ifdef VBOX_WS_NIX 1041 1041 if (uiCommon().X11ServerAvailable()) 1042 1042 { … … 1049 1049 XkbSetDetectableAutoRepeat(NativeWindowSubsystem::X11GetDisplay(), True, NULL); 1050 1050 } 1051 #endif /* VBOX_WS_ X11*/1051 #endif /* VBOX_WS_NIX */ 1052 1052 1053 1053 /* Extra data settings: */ … … 1575 1575 { 1576 1576 captureKeyboard(uScreenId); 1577 #ifdef VBOX_WS_ X111577 #ifdef VBOX_WS_NIX 1578 1578 /* Make sure that pending FocusOut events from the 1579 1579 * previous message box are handled, otherwise the … … 1581 1581 /// @todo Is that really needed? 1582 1582 qApp->processEvents(); 1583 #endif /* VBOX_WS_ X11*/1583 #endif /* VBOX_WS_NIX */ 1584 1584 finaliseCaptureKeyboard(); 1585 1585 if (fCaptureMouse) … … 1788 1788 delete[] pList; 1789 1789 1790 #elif defined(VBOX_WS_ X11)1790 #elif defined(VBOX_WS_NIX) 1791 1791 if (uiCommon().X11ServerAvailable()) 1792 1792 { … … 1865 1865 } 1866 1866 1867 #elif defined(VBOX_WS_ X11)1867 #elif defined(VBOX_WS_NIX) 1868 1868 if (uiCommon().X11ServerAvailable()) 1869 1869 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
r98983 r100064 58 58 class WinAltGrMonitor; 59 59 #endif 60 #ifdef VBOX_WS_ X1160 #ifdef VBOX_WS_NIX 61 61 # include <xcb/xcb.h> 62 62 #endif … … 228 228 /** Win: Holds the keyboard handler reference to be accessible from the keyboard hook. */ 229 229 static UIKeyboardHandler *m_spKeyboardHandler; 230 #elif defined(VBOX_WS_ X11)230 #elif defined(VBOX_WS_NIX) 231 231 /** The root window at the time we grab the mouse buttons. */ 232 232 xcb_window_t m_hButtonGrabWindow; 233 #endif /* VBOX_WS_ X11*/233 #endif /* VBOX_WS_NIX */ 234 234 }; 235 235 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r99842 r100064 1663 1663 connect(gpDesktop, &UIDesktopWidgetWatchdog::sigHostScreenResized, 1664 1664 this, &UIMachine::sltHandleHostScreenGeometryChange); 1665 # if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)1665 # if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 1666 1666 connect(gpDesktop, &UIDesktopWidgetWatchdog::sigHostScreenWorkAreaRecalculated, 1667 1667 this, &UIMachine::sltHandleHostScreenAvailableAreaChange); 1668 # else /* !VBOX_WS_ X11|| VBOX_GUI_WITH_CUSTOMIZATIONS1 */1668 # else /* !VBOX_WS_NIX || VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 1669 1669 connect(gpDesktop, &UIDesktopWidgetWatchdog::sigHostScreenWorkAreaResized, 1670 1670 this, &UIMachine::sltHandleHostScreenAvailableAreaChange); 1671 # endif /* !VBOX_WS_ X11|| VBOX_GUI_WITH_CUSTOMIZATIONS1 */1671 # endif /* !VBOX_WS_NIX || VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 1672 1672 #endif /* !VBOX_WS_MAC */ 1673 1673 } … … 2161 2161 m_fIsValidPointerShapePresent = true; 2162 2162 2163 #elif defined(VBOX_WS_ X11) || defined(VBOX_WS_MAC)2163 #elif defined(VBOX_WS_NIX) || defined(VBOX_WS_MAC) 2164 2164 2165 2165 /* Create an ARGB image out of the shape data: */ … … 2203 2203 } 2204 2204 2205 #if defined(VBOX_WS_ X11) || defined(VBOX_WS_MAC)2205 #if defined(VBOX_WS_NIX) || defined(VBOX_WS_MAC) 2206 2206 /* static */ 2207 2207 void UIMachine::renderCursorPixels(const uint32_t *pu32XOR, const uint8_t *pu8AND, … … 2291 2291 } 2292 2292 } 2293 #endif /* VBOX_WS_ X11|| VBOX_WS_MAC */2293 #endif /* VBOX_WS_NIX || VBOX_WS_MAC */ 2294 2294 2295 2295 #ifdef VBOX_WS_WIN -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r99142 r100064 905 905 void updateMouseState(); 906 906 907 #if defined(VBOX_WS_ X11) || defined(VBOX_WS_MAC)907 #if defined(VBOX_WS_NIX) || defined(VBOX_WS_MAC) 908 908 /** Generate a BGRA bitmap which approximates a XOR/AND mouse pointer. 909 909 * … … 919 919 uint32_t u32Width, uint32_t u32Height, 920 920 uint32_t *pu32Pixels, uint32_t cbPixels); 921 #endif /* VBOX_WS_ X11|| VBOX_WS_MAC */921 #endif /* VBOX_WS_NIX || VBOX_WS_MAC */ 922 922 923 923 #ifdef VBOX_WS_WIN -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r99946 r100064 82 82 # include "UINetworkRequestManager.h" 83 83 #endif 84 #ifdef VBOX_WS_ X1184 #ifdef VBOX_WS_NIX 85 85 # include "VBoxUtils-nix.h" 86 86 #endif … … 119 119 # include "VBoxUtils-win.h" 120 120 #endif 121 #ifdef VBOX_WS_ X11121 #ifdef VBOX_WS_NIX 122 122 # include <XKeyboard.h> 123 123 #endif … … 498 498 break; 499 499 } 500 #ifdef VBOX_WS_ X11500 #ifdef VBOX_WS_NIX 501 501 case KMachineState_Starting: 502 502 case KMachineState_Restoring: … … 580 580 void UIMachineLogic::sltDisableHostScreenSaverStateChanged(bool fDisabled) 581 581 { 582 #if defined(VBOX_WS_ X11)582 #if defined(VBOX_WS_NIX) 583 583 /* Find the methods once and cache them: */ 584 584 if (m_methods.isEmpty()) … … 785 785 UIMachineLogic::~UIMachineLogic() 786 786 { 787 #if defined(VBOX_WS_ X11)787 #if defined(VBOX_WS_NIX) 788 788 qDeleteAll(m_methods.begin(), m_methods.end()); 789 789 m_methods.clear(); … … 923 923 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)); 924 924 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD)); 925 #ifdef VBOX_WS_ X11925 #ifdef VBOX_WS_NIX 926 926 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS)); 927 #endif /* VBOX_WS_ X11*/927 #endif /* VBOX_WS_NIX */ 928 928 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCtrlBreak)); 929 929 m_pRunningActions->addAction(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeInsert)); … … 1054 1054 connect(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD), &UIAction::triggered, 1055 1055 this, &UIMachineLogic::sltTypeCAD); 1056 #ifdef VBOX_WS_ X111056 #ifdef VBOX_WS_NIX 1057 1057 connect(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS), &UIAction::triggered, 1058 1058 this, &UIMachineLogic::sltTypeCABS); 1059 #endif /* VBOX_WS_ X11*/1059 #endif /* VBOX_WS_NIX */ 1060 1060 connect(actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCtrlBreak), &UIAction::triggered, 1061 1061 this, &UIMachineLogic::sltTypeCtrlBreak); … … 1389 1389 sltSwitchKeyboardLedsToGuestLeds(); 1390 1390 1391 #if defined(VBOX_WS_ X11) || defined(VBOX_WS_WIN)1391 #if defined(VBOX_WS_NIX) || defined(VBOX_WS_WIN) 1392 1392 connect(gEDataManager, &UIExtraDataManager::sigDisableHostScreenSaverStateChange, 1393 1393 this, &UIMachineLogic::sltDisableHostScreenSaverStateChanged); … … 1942 1942 1943 1943 /* On X11 Qt Filedialog returns the filepath without the filetype suffix, so adding it ourselves: */ 1944 #ifdef VBOX_WS_ X111944 #ifdef VBOX_WS_NIX 1945 1945 /* Add filetype suffix only if user has not added it explicitly: */ 1946 1946 if (!strFilename.endsWith(QString(".%1").arg(strFormat))) … … 1950 1950 tmpImage.save(QDir::toNativeSeparators(QFile::encodeName(strFilename)), 1951 1951 strFormat.toUtf8().constData()); 1952 #else /* !VBOX_WS_ X11*/1952 #else /* !VBOX_WS_NIX */ 1953 1953 QFile file(strFilename); 1954 1954 if (file.open(QIODevice::WriteOnly)) 1955 1955 tmpImage.save(&file, strFormat.toUtf8().constData()); 1956 #endif /* !VBOX_WS_ X11*/1956 #endif /* !VBOX_WS_NIX */ 1957 1957 } 1958 1958 QFile::remove(strTempFile); … … 2052 2052 } 2053 2053 2054 #ifdef VBOX_WS_ X112054 #ifdef VBOX_WS_NIX 2055 2055 void UIMachineLogic::sltTypeCABS() 2056 2056 { … … 2064 2064 uimachine()->putScancodes(sequence); 2065 2065 } 2066 #endif /* VBOX_WS_ X11*/2066 #endif /* VBOX_WS_NIX */ 2067 2067 2068 2068 void UIMachineLogic::sltTypeCtrlBreak() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r99946 r100064 52 52 class CUSBDevice; 53 53 class CVirtualBoxErrorInfo; 54 #if defined(VBOX_WS_ X11)54 #if defined(VBOX_WS_NIX) 55 55 struct DBusScreenSaverInhibitMethod; 56 56 #endif … … 266 266 void sltCloseSoftKeyboardDefault() { sltCloseSoftKeyboard(true); } 267 267 void sltTypeCAD(); 268 #ifdef VBOX_WS_ X11268 #ifdef VBOX_WS_NIX 269 269 void sltTypeCABS(); 270 #endif /* VBOX_WS_ X11*/270 #endif /* VBOX_WS_NIX */ 271 271 void sltTypeCtrlBreak(); 272 272 void sltTypeInsert(); … … 407 407 /* Holds the cookies returnd by QDBus inhibition calls. Map keys are service name. These are required during uninhibition.*/ 408 408 QMap<QString, uint> m_screenSaverInhibitionCookies; 409 #if defined(VBOX_WS_ X11)409 #if defined(VBOX_WS_NIX) 410 410 QVector<DBusScreenSaverInhibitMethod*> m_methods; 411 411 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r100063 r100064 89 89 # include <Carbon/Carbon.h> 90 90 #endif 91 #ifdef VBOX_WS_ X1191 #ifdef VBOX_WS_NIX 92 92 # include <xcb/xcb.h> 93 93 #endif … … 241 241 { 242 242 double dScaleFactorFor3D = dScaleFactor; 243 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)243 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 244 244 // WORKAROUND: 245 245 // On Windows and Linux opposing to macOS it's only Qt which can auto scale up, … … 247 247 if (!fUseUnscaledHiDPIOutput) 248 248 dScaleFactorFor3D *= dDevicePixelRatioActual; 249 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/249 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 250 250 uimachine()->notifyScaleFactorChange(m_uScreenId, 251 251 (uint32_t)(dScaleFactorFor3D * VBOX_OGL_SCALE_FACTOR_MULTIPLIER), … … 538 538 } 539 539 540 # elif defined(VBOX_WS_ X11)540 # elif defined(VBOX_WS_NIX) 541 541 542 542 if (uiCommon().X11ServerAvailable()) … … 1003 1003 { 1004 1004 double dScaleFactorFor3D = dScaleFactor; 1005 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)1005 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 1006 1006 // WORKAROUND: 1007 1007 // On Windows and Linux opposing to macOS it's only Qt which can auto scale up, … … 1009 1009 if (!fUseUnscaledHiDPIOutput) 1010 1010 dScaleFactorFor3D *= frameBuffer()->devicePixelRatioActual(); 1011 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/1011 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 1012 1012 uimachine()->notifyScaleFactorChange(m_uScreenId, 1013 1013 (uint32_t)(dScaleFactorFor3D * VBOX_OGL_SCALE_FACTOR_MULTIPLIER), … … 1229 1229 uimachine()->acquireLiveMachineState(enmActualState); 1230 1230 1231 #ifdef VBOX_WS_ X111231 #ifdef VBOX_WS_NIX 1232 1232 // WORKAROUND: 1233 1233 // No idea why this was required for X11 before. … … 1237 1237 size = storedGuestScreenSizeHint(); 1238 1238 # endif 1239 #endif /* VBOX_WS_ X11*/1239 #endif /* VBOX_WS_NIX */ 1240 1240 1241 1241 /* If there is a preview image saved, we will resize the framebuffer to the size of that image: */ … … 1958 1958 QAbstractScrollArea::focusOutEvent(pEvent); 1959 1959 } 1960 #ifdef VBOX_WS_ X111960 #ifdef VBOX_WS_NIX 1961 1961 void UIMachineView::keyPressEvent(QKeyEvent *pEvent) 1962 1962 { … … 2163 2163 } 2164 2164 2165 #elif defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)2165 #elif defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 2166 2166 2167 2167 /* We want to scale the pixmap just once, so let's prepare cumulative multiplier: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r100043 r100064 324 324 /** Handles focus-out @a pEvent. */ 325 325 void focusOutEvent(QFocusEvent *pEvent); 326 #ifdef VBOX_WS_ X11326 #ifdef VBOX_WS_NIX 327 327 virtual void keyPressEvent(QKeyEvent *pEvent) override; 328 328 virtual void keyReleaseEvent(QKeyEvent *pEvent) override; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r99438 r100064 142 142 updateAppearanceOf(UIVisualElement_AllStuff); 143 143 144 #ifdef VBOX_WS_ X11144 #ifdef VBOX_WS_NIX 145 145 /* Prepare default class/name values: */ 146 146 const QString strWindowClass = QString("VirtualBox Machine"); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r99012 r100064 118 118 protected slots: 119 119 120 #ifdef VBOX_WS_ X11120 #ifdef VBOX_WS_NIX 121 121 /** X11: Performs machine-window geometry normalization. */ 122 122 void sltNormalizeGeometry() { normalizeGeometry(true /* adjust position */, shouldResizeToGuestDisplay()); } 123 #endif /* VBOX_WS_ X11*/123 #endif /* VBOX_WS_NIX */ 124 124 125 125 /** Performs machine-window activation. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r100034 r100064 52 52 # include "VBoxUtils-win.h" 53 53 #endif 54 #ifdef VBOX_WS_ X1154 #ifdef VBOX_WS_NIX 55 55 # include "VBoxUtils-nix.h" 56 56 #endif … … 311 311 RT_NOREF(pMessage, uScreenId); 312 312 313 # elif defined(VBOX_WS_ X11)313 # elif defined(VBOX_WS_NIX) 314 314 315 315 if (uiCommon().X11ServerAvailable()) … … 507 507 /* Activate it: */ 508 508 m_pHoveredWindow->activateWindow(); 509 #ifdef VBOX_WS_ X11509 #ifdef VBOX_WS_NIX 510 510 /* On X11 its not enough to just activate window if you 511 511 * want to raise it also, so we will make it separately: */ 512 512 m_pHoveredWindow->raise(); 513 #endif /* VBOX_WS_ X11*/513 #endif /* VBOX_WS_NIX */ 514 514 } 515 515 } … … 682 682 } 683 683 684 #ifdef VBOX_WS_ X11684 #ifdef VBOX_WS_NIX 685 685 /* Make sure that we are focused after a click. Rather 686 686 * ugly, but works around a problem with GNOME … … 689 689 if (pEvent->type() == QEvent::MouseButtonRelease) 690 690 pWatchedWidget->window()->activateWindow(); 691 #endif /* VBOX_WS_ X11*/691 #endif /* VBOX_WS_NIX */ 692 692 /* Check if we should activate window under cursor: */ 693 693 if (gEDataManager->activateHoveredMachineWindow() && … … 715 715 { 716 716 QMouseEvent *pMouseEvent = static_cast<QMouseEvent*>(pEvent); 717 #ifdef VBOX_WS_ X11717 #ifdef VBOX_WS_NIX 718 718 /* When the keyboard is captured, we also capture mouse button 719 719 * events, and release the keyboard and re-capture it delayed … … 724 724 if (pEvent->type() == QEvent::MouseButtonPress) 725 725 machineLogic()->keyboardHandler()->finaliseCaptureKeyboard(); 726 #endif /* VBOX_WS_ X11*/726 #endif /* VBOX_WS_NIX */ 727 727 728 728 /* For various mouse click related events … … 1163 1163 if (ok) 1164 1164 { 1165 #ifdef VBOX_WS_ X111165 #ifdef VBOX_WS_NIX 1166 1166 /* Make sure that pending FocusOut events from the previous message box are handled, 1167 1167 * otherwise the mouse is immediately ungrabbed again: */ 1168 1168 qApp->processEvents(); 1169 #endif /* VBOX_WS_ X11*/1169 #endif /* VBOX_WS_NIX */ 1170 1170 machineLogic()->keyboardHandler()->captureKeyboard(uScreenId); 1171 1171 const MouseCapturePolicy mcp = gEDataManager->mouseCapturePolicy(uiCommon().managedVMUuid()); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r99843 r100064 91 91 92 92 /* External includes: */ 93 #ifdef VBOX_WS_ X1193 #ifdef VBOX_WS_NIX 94 94 # include <X11/Xlib.h> 95 95 # include <X11/Xutil.h> … … 219 219 /* Some logging right after we powered up: */ 220 220 LogRel(("GUI: Qt version: %s\n", UICommon::qtRTVersionString().toUtf8().constData())); 221 #ifdef VBOX_WS_ X11221 #ifdef VBOX_WS_NIX 222 222 LogRel(("GUI: X11 Window Manager code: %d\n", (int)uiCommon().typeOfWindowManager())); 223 223 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r98885 r100064 528 528 setMachineWindowsCreated(true); 529 529 530 #ifdef VBOX_WS_ X11530 #ifdef VBOX_WS_NIX 531 531 switch (uiCommon().typeOfWindowManager()) 532 532 { … … 544 544 break; 545 545 } 546 #endif /* VBOX_WS_ X11*/546 #endif /* VBOX_WS_NIX */ 547 547 } 548 548 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r98859 r100064 48 48 49 49 /* External includes: */ 50 #ifdef VBOX_WS_ X1150 #ifdef VBOX_WS_NIX 51 51 # include <limits.h> 52 #endif /* VBOX_WS_ X11*/52 #endif /* VBOX_WS_NIX */ 53 53 54 54 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r98885 r100064 43 43 #include "UIMachineWindowFullscreen.h" 44 44 #include "UINotificationCenter.h" 45 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)45 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 46 46 # include "UIMachineDefs.h" 47 47 # include "UIMiniToolBar.h" … … 57 57 UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId) 58 58 : UIMachineWindow(pMachineLogic, uScreenId) 59 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)59 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 60 60 , m_pMiniToolBar(0) 61 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/61 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 62 62 #ifdef VBOX_WS_MAC 63 63 , m_fIsInFullscreenTransition(false) 64 64 #endif /* VBOX_WS_MAC */ 65 65 , m_fWasMinimized(false) 66 #ifdef VBOX_WS_ X1166 #ifdef VBOX_WS_NIX 67 67 , m_fIsMinimizationRequested(false) 68 68 , m_fIsMinimized(false) … … 126 126 #endif /* VBOX_WS_MAC */ 127 127 128 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)128 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 129 129 void UIMachineWindowFullscreen::sltMachineStateChanged() 130 130 { … … 138 138 void UIMachineWindowFullscreen::sltRevokeWindowActivation() 139 139 { 140 #ifdef VBOX_WS_ X11140 #ifdef VBOX_WS_NIX 141 141 // WORKAROUND: 142 142 // We could be asked to minimize already, but just … … 151 151 152 152 /* Revoke stolen activation: */ 153 #ifdef VBOX_WS_ X11153 #ifdef VBOX_WS_NIX 154 154 raise(); 155 #endif /* VBOX_WS_ X11*/155 #endif /* VBOX_WS_NIX */ 156 156 activateWindow(); 157 157 } … … 162 162 gEDataManager->setAutoHideMiniToolbar(fEnabled, uiCommon().managedVMUuid()); 163 163 } 164 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/164 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 165 165 166 166 #ifdef VBOX_WS_MAC … … 211 211 void UIMachineWindowFullscreen::sltShowMinimized() 212 212 { 213 #ifdef VBOX_WS_ X11213 #ifdef VBOX_WS_NIX 214 214 /* Remember that we are asked to minimize: */ 215 215 m_fIsMinimizationRequested = true; … … 237 237 setAutoFillBackground(true); 238 238 239 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)239 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 240 240 /* Prepare mini-toolbar: */ 241 241 prepareMiniToolbar(); 242 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/242 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 243 243 244 244 #ifdef VBOX_WS_MAC … … 266 266 } 267 267 268 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)268 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 269 269 void UIMachineWindowFullscreen::prepareMiniToolbar() 270 270 { … … 295 295 } 296 296 } 297 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/298 299 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)297 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 298 299 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 300 300 void UIMachineWindowFullscreen::cleanupMiniToolbar() 301 301 { … … 304 304 m_pMiniToolBar = 0; 305 305 } 306 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/306 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 307 307 308 308 void UIMachineWindowFullscreen::cleanupVisualState() … … 317 317 #endif /* VBOX_WS_MAC */ 318 318 319 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)319 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 320 320 /* Cleanup mini-toolbar: */ 321 321 cleanupMiniToolbar(); 322 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/322 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 323 323 324 324 /* Call to base-class: */ … … 380 380 resize(workingArea.size()); 381 381 382 #elif defined(VBOX_WS_ X11)382 #elif defined(VBOX_WS_NIX) 383 383 384 384 /* Determine whether we should use the native full-screen mode: */ … … 476 476 } 477 477 478 #elif defined(VBOX_WS_ X11)478 #elif defined(VBOX_WS_NIX) 479 479 480 480 /* If window shouldn't be shown or mapped to some host-screen: */ … … 529 529 } 530 530 531 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)531 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 532 532 void UIMachineWindowFullscreen::updateAppearanceOf(int iElement) 533 533 { … … 556 556 } 557 557 } 558 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/559 560 #ifdef VBOX_WS_ X11558 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 559 560 #ifdef VBOX_WS_NIX 561 561 void UIMachineWindowFullscreen::changeEvent(QEvent *pEvent) 562 562 { … … 598 598 UIMachineWindow::changeEvent(pEvent); 599 599 } 600 #endif /* VBOX_WS_ X11*/600 #endif /* VBOX_WS_NIX */ 601 601 602 602 #ifdef VBOX_WS_WIN -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r98103 r100064 35 35 #include "UIMachineWindow.h" 36 36 37 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)37 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 38 38 /* Forward declarations: */ 39 39 class UIMiniToolBar; 40 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/40 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 41 41 42 42 /** UIMachineWindow subclass used as full-screen machine window implementation. */ … … 75 75 private slots: 76 76 77 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)77 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 78 78 /** Handles machine state change event. */ 79 79 void sltMachineStateChanged(); … … 85 85 * @param fEnabled Brings whether auto-hide is enabled. */ 86 86 void sltHandleMiniToolBarAutoHideToggled(bool fEnabled); 87 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/87 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 88 88 89 89 #ifdef RT_OS_DARWIN … … 103 103 /** Prepare visual-state routine. */ 104 104 void prepareVisualState(); 105 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)105 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 106 106 /** Prepare mini-toolbar routine. */ 107 107 void prepareMiniToolbar(); 108 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/108 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 109 109 110 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)110 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 111 111 /** Cleanup mini-toolbar routine. */ 112 112 void cleanupMiniToolbar(); 113 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/113 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 114 114 /** Cleanup visual-state routine. */ 115 115 void cleanupVisualState(); … … 122 122 void showInNecessaryMode(); 123 123 124 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)124 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 125 125 /** Common update routine. */ 126 126 void updateAppearanceOf(int iElement); 127 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/127 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 128 128 129 #ifdef VBOX_WS_ X11129 #ifdef VBOX_WS_NIX 130 130 /** X11: Handles @a pEvent about state change. */ 131 131 void changeEvent(QEvent *pEvent); … … 137 137 #endif 138 138 139 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)139 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 140 140 /** Holds the mini-toolbar instance. */ 141 141 UIMiniToolBar *m_pMiniToolBar; 142 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/142 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 143 143 144 144 #ifdef VBOX_WS_MAC … … 152 152 * Used to restore minimized state when the window shown again. */ 153 153 bool m_fWasMinimized; 154 #ifdef VBOX_WS_ X11154 #ifdef VBOX_WS_NIX 155 155 /** X11: Holds whether the window minimization is currently requested. 156 156 * Used to prevent accidentally restoring to full-screen state. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r98849 r100064 219 219 void UIMachineLogicNormal::sltHostScreenAvailableAreaChange() 220 220 { 221 #if defined(VBOX_WS_ X11) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)221 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1) 222 222 /* Prevent handling if fake screen detected: */ 223 223 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) … … 228 228 if (!pMachineWindow->isMaximized()) 229 229 pMachineWindow->restoreCachedGeometry(); 230 #endif /* VBOX_WS_ X11&& !VBOX_GUI_WITH_CUSTOMIZATIONS1 */230 #endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 231 231 232 232 /* Call to base-class: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r99098 r100064 32 32 #include <QResizeEvent> 33 33 #include <QScrollBar> 34 #ifdef VBOX_WS_ X1134 #ifdef VBOX_WS_NIX 35 35 # include <QTimer> 36 36 #endif … … 336 336 337 337 /* Normalize to the optimal size: */ 338 #ifdef VBOX_WS_ X11338 #ifdef VBOX_WS_NIX 339 339 QTimer::singleShot(0, this, SLOT(sltNormalizeGeometry())); 340 #else /* !VBOX_WS_ X11*/340 #else /* !VBOX_WS_NIX */ 341 341 normalizeGeometry(true /* adjust position */, shouldResizeToGuestDisplay()); 342 #endif /* !VBOX_WS_ X11*/342 #endif /* !VBOX_WS_NIX */ 343 343 } 344 344 #endif /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */ … … 371 371 case QEvent::Resize: 372 372 { 373 #ifdef VBOX_WS_ X11373 #ifdef VBOX_WS_NIX 374 374 /* Prevent handling if fake screen detected: */ 375 375 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) 376 376 break; 377 #endif /* VBOX_WS_ X11*/377 #endif /* VBOX_WS_NIX */ 378 378 379 379 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent); … … 398 398 case QEvent::Move: 399 399 { 400 #ifdef VBOX_WS_ X11400 #ifdef VBOX_WS_NIX 401 401 /* Prevent handling if fake screen detected: */ 402 402 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) 403 403 break; 404 #endif /* VBOX_WS_ X11*/404 #endif /* VBOX_WS_NIX */ 405 405 406 406 if (!isMaximizedChecked()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
r98849 r100064 85 85 void UIMachineLogicScale::sltHostScreenAvailableAreaChange() 86 86 { 87 #ifdef VBOX_WS_ X1187 #ifdef VBOX_WS_NIX 88 88 /* Prevent handling if fake screen detected: */ 89 89 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) … … 93 93 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 94 94 pMachineWindow->restoreCachedGeometry(); 95 #endif /* VBOX_WS_ X11*/95 #endif /* VBOX_WS_NIX */ 96 96 97 97 /* Call to base-class: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r98670 r100064 76 76 double xScaleFactor = (double)scaledSize.width() / frameBuffer()->width(); 77 77 double yScaleFactor = (double)scaledSize.height() / frameBuffer()->height(); 78 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)78 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 79 79 // WORKAROUND: 80 80 // On Windows and Linux opposing to macOS it's only Qt which can auto scale up, … … 85 85 yScaleFactor *= dDevicePixelRatioActual; 86 86 } 87 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/87 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 88 88 uimachine()->notifyScaleFactorChange(m_uScreenId, 89 89 (uint32_t)(xScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER), … … 137 137 double xScaleFactor = (double)scaledSize.width() / frameBuffer()->width(); 138 138 double yScaleFactor = (double)scaledSize.height() / frameBuffer()->height(); 139 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)139 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 140 140 // WORKAROUND: 141 141 // On Windows and Linux opposing to macOS it's only Qt which can auto scale up, … … 146 146 yScaleFactor *= dDevicePixelRatioActual; 147 147 } 148 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/148 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 149 149 uimachine()->notifyScaleFactorChange(m_uScreenId, 150 150 (uint32_t)(xScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER), -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r98885 r100064 31 31 #include <QSpacerItem> 32 32 #include <QResizeEvent> 33 #ifdef VBOX_WS_ X1133 #ifdef VBOX_WS_NIX 34 34 # include <QTimer> 35 35 #endif … … 136 136 137 137 /* Normalize to the optimal size: */ 138 #ifdef VBOX_WS_ X11138 #ifdef VBOX_WS_NIX 139 139 QTimer::singleShot(0, this, SLOT(sltNormalizeGeometry())); 140 #else /* !VBOX_WS_ X11*/140 #else /* !VBOX_WS_NIX */ 141 141 normalizeGeometry(true /* adjust position */, true /* resize to fit guest display. ignored in scaled case */); 142 #endif /* !VBOX_WS_ X11*/142 #endif /* !VBOX_WS_NIX */ 143 143 } 144 144 } … … 215 215 case QEvent::Resize: 216 216 { 217 #ifdef VBOX_WS_ X11217 #ifdef VBOX_WS_NIX 218 218 /* Prevent handling if fake screen detected: */ 219 219 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) 220 220 break; 221 #endif /* VBOX_WS_ X11*/221 #endif /* VBOX_WS_NIX */ 222 222 223 223 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent); … … 239 239 case QEvent::Move: 240 240 { 241 #ifdef VBOX_WS_ X11241 #ifdef VBOX_WS_NIX 242 242 /* Prevent handling if fake screen detected: */ 243 243 if (UIDesktopWidgetWatchdog::isFakeScreenDetected()) 244 244 break; 245 #endif /* VBOX_WS_ X11*/245 #endif /* VBOX_WS_NIX */ 246 246 247 247 if (!isMaximizedChecked()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r98849 r100064 284 284 setMachineWindowsCreated(true); 285 285 286 #ifdef VBOX_WS_ X11286 #ifdef VBOX_WS_NIX 287 287 switch (uiCommon().typeOfWindowManager()) 288 288 { … … 300 300 break; 301 301 } 302 #endif /* VBOX_WS_ X11*/302 #endif /* VBOX_WS_NIX */ 303 303 } 304 304 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r98859 r100064 50 50 51 51 /* External includes: */ 52 #ifdef VBOX_WS_ X1152 #ifdef VBOX_WS_NIX 53 53 # include <limits.h> 54 #endif /* VBOX_WS_ X11*/54 #endif /* VBOX_WS_NIX */ 55 55 56 56 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r98675 r100064 40 40 #include "UIMachineView.h" 41 41 #include "UIMachineWindowSeamless.h" 42 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)42 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 43 43 # include "UIMachineDefs.h" 44 44 # include "UIMiniToolBar.h" … … 53 53 UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId) 54 54 : UIMachineWindow(pMachineLogic, uScreenId) 55 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)55 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 56 56 , m_pMiniToolBar(0) 57 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/57 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 58 58 , m_fWasMinimized(false) 59 #ifdef VBOX_WS_ X1159 #ifdef VBOX_WS_NIX 60 60 , m_fIsMinimizationRequested(false) 61 61 , m_fIsMinimized(false) … … 64 64 } 65 65 66 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)66 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 67 67 void UIMachineWindowSeamless::sltMachineStateChanged() 68 68 { … … 76 76 void UIMachineWindowSeamless::sltRevokeWindowActivation() 77 77 { 78 #ifdef VBOX_WS_ X1178 #ifdef VBOX_WS_NIX 79 79 // WORKAROUND: 80 80 // We could be asked to minimize already, but just … … 89 89 90 90 /* Revoke stolen activation: */ 91 #ifdef VBOX_WS_ X1191 #ifdef VBOX_WS_NIX 92 92 raise(); 93 #endif /* VBOX_WS_ X11*/93 #endif /* VBOX_WS_NIX */ 94 94 activateWindow(); 95 95 } … … 100 100 gEDataManager->setAutoHideMiniToolbar(fEnabled, uiCommon().managedVMUuid()); 101 101 } 102 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/102 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 103 103 104 104 void UIMachineWindowSeamless::sltShowMinimized() 105 105 { 106 #ifdef VBOX_WS_ X11106 #ifdef VBOX_WS_NIX 107 107 /* Remember that we are asked to minimize: */ 108 108 m_fIsMinimizationRequested = true; … … 132 132 #endif /* VBOX_WITH_MASKED_SEAMLESS */ 133 133 134 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)134 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 135 135 /* Prepare mini-toolbar: */ 136 136 prepareMiniToolbar(); 137 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/138 } 139 140 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)137 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 138 } 139 140 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 141 141 void UIMachineWindowSeamless::prepareMiniToolbar() 142 142 { … … 167 167 } 168 168 } 169 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/170 171 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)169 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 170 171 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 172 172 void UIMachineWindowSeamless::cleanupMiniToolbar() 173 173 { … … 176 176 m_pMiniToolBar = 0; 177 177 } 178 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/178 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 179 179 180 180 void UIMachineWindowSeamless::cleanupVisualState() 181 181 { 182 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)182 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 183 183 /* Cleanup mini-toolbar: */ 184 184 cleanupMiniToolbar(); 185 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/185 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 186 186 187 187 /* Call to base-class: */ … … 201 201 Q_UNUSED(workingArea); 202 202 203 #ifdef VBOX_WS_ X11203 #ifdef VBOX_WS_NIX 204 204 205 205 /* Make sure we are located on corresponding host-screen: */ … … 273 273 placeOnScreen(); 274 274 275 #ifdef VBOX_WS_ X11275 #ifdef VBOX_WS_NIX 276 276 /* Show window: */ 277 277 if (!isMaximized()) … … 297 297 } 298 298 299 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)299 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 300 300 void UIMachineWindowSeamless::updateAppearanceOf(int iElement) 301 301 { … … 324 324 } 325 325 } 326 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/327 328 #ifdef VBOX_WS_ X11326 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 327 328 #ifdef VBOX_WS_NIX 329 329 void UIMachineWindowSeamless::changeEvent(QEvent *pEvent) 330 330 { … … 366 366 UIMachineWindow::changeEvent(pEvent); 367 367 } 368 #endif /* VBOX_WS_ X11*/368 #endif /* VBOX_WS_NIX */ 369 369 370 370 #ifdef VBOX_WS_WIN -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r98103 r100064 35 35 #include "UIMachineWindow.h" 36 36 37 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)37 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 38 38 /* Forward declarations: */ 39 39 class UIMiniToolBar; 40 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/40 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 41 41 42 42 /** UIMachineWindow subclass used as seamless machine window implementation. */ … … 52 52 private slots: 53 53 54 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)54 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 55 55 /** Handles machine state change event. */ 56 56 void sltMachineStateChanged(); … … 62 62 * @param fEnabled Brings whether auto-hide is enabled. */ 63 63 void sltHandleMiniToolBarAutoHideToggled(bool fEnabled); 64 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/64 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 65 65 66 66 /** Shows window in minimized state. */ … … 71 71 /** Prepare visual-state routine. */ 72 72 void prepareVisualState(); 73 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)73 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 74 74 /** Prepare mini-toolbar routine. */ 75 75 void prepareMiniToolbar(); 76 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/76 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 77 77 78 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)78 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 79 79 /** Cleanup mini-toolbar routine. */ 80 80 void cleanupMiniToolbar(); 81 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/81 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 82 82 /** Cleanup visual-state routine. */ 83 83 void cleanupVisualState(); … … 88 88 void showInNecessaryMode(); 89 89 90 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)90 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 91 91 /** Common update routine. */ 92 92 void updateAppearanceOf(int iElement); 93 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/93 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 94 94 95 #ifdef VBOX_WS_ X1195 #ifdef VBOX_WS_NIX 96 96 /** X11: Handles @a pEvent about state change. */ 97 97 void changeEvent(QEvent *pEvent); … … 108 108 #endif /* VBOX_WITH_MASKED_SEAMLESS */ 109 109 110 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)110 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 111 111 /** Holds the mini-toolbar instance. */ 112 112 UIMiniToolBar *m_pMiniToolBar; 113 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/113 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 114 114 115 115 #ifdef VBOX_WITH_MASKED_SEAMLESS … … 123 123 * Used to restore minimized state when the window shown again. */ 124 124 bool m_fWasMinimized; 125 #ifdef VBOX_WS_ X11125 #ifdef VBOX_WS_NIX 126 126 /** X11: Holds whether the window minimization is currently requested. 127 127 * Used to prevent accidentally restoring to seamless state. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDisplayFeaturesEditor.cpp
r99479 r100064 33 33 /* GUI includes: */ 34 34 #include "UIDisplayFeaturesEditor.h" 35 #ifdef VBOX_WS_ X1135 #ifdef VBOX_WS_NIX 36 36 # include "VBoxUtils-nix.h" 37 37 #endif … … 141 141 #if defined(VBOX_WS_WIN) 142 142 m_pCheckBoxDisableHostScreenSaver = new QCheckBox(this); 143 #elif defined(VBOX_WS_ X11)143 #elif defined(VBOX_WS_NIX) 144 144 if (NativeWindowSubsystem::checkDBusScreenSaverServices()) 145 145 m_pCheckBoxDisableHostScreenSaver = new QCheckBox(this); 146 #endif /* VBOX_WS_ X11*/146 #endif /* VBOX_WS_NIX */ 147 147 if (m_pCheckBoxDisableHostScreenSaver) 148 148 m_pLayout->addWidget(m_pCheckBoxDisableHostScreenSaver, 1, 1); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.cpp
r99802 r100064 49 49 #elif defined(VBOX_WS_WIN) 50 50 # include "WinKeyboard.h" 51 #elif defined(VBOX_WS_ X11)51 #elif defined(VBOX_WS_NIX) 52 52 # include "XKeyboard.h" 53 53 # include "VBoxUtils-nix.h" … … 55 55 56 56 /* Other VBox includes: */ 57 #if defined(VBOX_WS_ X11)57 #if defined(VBOX_WS_NIX) 58 58 # include <VBox/VBoxKeyboard.h> 59 59 #endif … … 62 62 #if defined(VBOX_WS_MAC) 63 63 # include <Carbon/Carbon.h> 64 #elif defined(VBOX_WS_ X11)64 #elif defined(VBOX_WS_NIX) 65 65 # include <X11/Xlib.h> 66 66 # include <X11/Xutil.h> 67 67 # include <X11/keysym.h> 68 68 # include <xcb/xcb.h> 69 #endif /* VBOX_WS_ X11*/69 #endif /* VBOX_WS_NIX */ 70 70 71 71 /* Namespaces: */ … … 115 115 *********************************************************************************************************************************/ 116 116 117 #ifdef VBOX_WS_ X11117 #ifdef VBOX_WS_NIX 118 118 namespace UINativeHotKey 119 119 { 120 120 QMap<QString, QString> m_keyNames; 121 121 } 122 #endif /* VBOX_WS_ X11*/122 #endif /* VBOX_WS_NIX */ 123 123 124 124 QString UINativeHotKey::toString(int iKeyCode) … … 197 197 } 198 198 199 #elif defined(VBOX_WS_ X11)199 #elif defined(VBOX_WS_NIX) 200 200 201 201 if (char *pNativeKeyName = ::XKeysymToString((KeySym)iKeyCode)) … … 252 252 || iKeyCode == VK_PRINT; 253 253 254 #elif defined(VBOX_WS_ X11)254 #elif defined(VBOX_WS_NIX) 255 255 256 256 return (IsModifierKey(iKeyCode) /* allow modifiers */ || … … 302 302 default: return 0; 303 303 304 #elif defined(VBOX_WS_ X11)304 #elif defined(VBOX_WS_NIX) 305 305 306 306 case XK_Control_L: return 0x1D; … … 369 369 } 370 370 371 #elif defined(VBOX_WS_ X11)371 #elif defined(VBOX_WS_NIX) 372 372 373 373 void UINativeHotKey::retranslateKeyNames() … … 387 387 } 388 388 389 #endif /* VBOX_WS_ X11*/389 #endif /* VBOX_WS_NIX */ 390 390 391 391 … … 568 568 /* Prepare AltGR monitor: */ 569 569 m_pAltGrMonitor = new WinAltGrMonitor; 570 #elif defined(VBOX_WS_ X11)570 #elif defined(VBOX_WS_NIX) 571 571 /* Initialize the X keyboard subsystem: */ 572 572 if (uiCommon().X11ServerAvailable()) 573 573 initMappedX11Keyboard(NativeWindowSubsystem::X11GetDisplay(), gEDataManager->remappedScanCodes()); 574 #endif /* VBOX_WS_ X11*/574 #endif /* VBOX_WS_NIX */ 575 575 } 576 576 … … 743 743 } 744 744 745 # elif defined(VBOX_WS_ X11)745 # elif defined(VBOX_WS_NIX) 746 746 if (uiCommon().X11ServerAvailable()) 747 747 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.h
r98103 r100064 73 73 /** Distinguishes modifier VKey by @a wParam and @a lParam. */ 74 74 SHARED_LIBRARY_STUFF int distinguishModifierVKey(int wParam, int lParam); 75 #elif defined(VBOX_WS_ X11)75 #elif defined(VBOX_WS_NIX) 76 76 /** Retranslates key names. */ 77 77 SHARED_LIBRARY_STUFF void retranslateKeyNames(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISharedFolderDetailsEditor.cpp
r99840 r100064 218 218 #if defined (VBOX_WS_WIN) || defined (Q_OS_OS2) 219 219 m_pEditorName->setText(strFolderName.toUpper().left(1) + "_DRIVE"); 220 #elif defined (VBOX_WS_ X11)220 #elif defined (VBOX_WS_NIX) 221 221 m_pEditorName->setText("ROOT"); 222 222 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
r98103 r100064 120 120 oldData.m_scaleFactors = gEDataManager->scaleFactors(UIExtraDataManager::GlobalID); 121 121 oldData.m_fActivateHoveredMachineWindow = gEDataManager->activateHoveredMachineWindow(); 122 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)122 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 123 123 oldData.m_fDisableHostScreenSaver = gEDataManager->disableHostScreenSaver(); 124 124 #endif … … 285 285 && newData.m_fActivateHoveredMachineWindow != oldData.m_fActivateHoveredMachineWindow) 286 286 /* fSuccess = */ gEDataManager->setActivateHoveredMachineWindow(newData.m_fActivateHoveredMachineWindow); 287 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)287 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 288 288 /* Save whether the host screen saver is to be disable when a vm is running: */ 289 289 if ( fSuccess 290 290 && newData.m_fDisableHostScreenSaver != oldData.m_fDisableHostScreenSaver) 291 291 /* fSuccess = */ gEDataManager->setDisableHostScreenSaver(newData.m_fDisableHostScreenSaver); 292 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/292 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 293 293 /* Save font scale factor: */ 294 294 if ( fSuccess -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp
r98103 r100064 692 692 color1.setAlpha(0); 693 693 QColor color2 = pal.color(QPalette::Window).darker(200); 694 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)694 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 695 695 QColor color3 = pal.color(QPalette::Window).darker(120); 696 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/696 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 697 697 698 698 /* Acquire metric: */ … … 738 738 painter.fillRect(QRect(width() - iMetric, 0, iMetric, height() - iMetric), grad5); // right line 739 739 740 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)740 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 741 741 /* Paint frames: */ 742 742 painter.save(); … … 751 751 painter.drawLine(QLine(QPoint(width() - 1 - iMetric - 1, 0), QPoint(iMetric + 1, 0))); 752 752 painter.restore(); 753 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/753 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 754 754 } 755 755 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r98103 r100064 40 40 #include <QVBoxLayout> 41 41 #include <QWindow> 42 #ifdef VBOX_WS_ X1142 #ifdef VBOX_WS_NIX 43 43 # include <QWindowStateChangeEvent> 44 44 #endif … … 50 50 #include "UIDesktopWidgetWatchdog.h" 51 51 #include "UICommon.h" 52 #ifdef VBOX_WS_ X1152 #ifdef VBOX_WS_NIX 53 53 # include "UIExtraDataManager.h" 54 54 #endif … … 293 293 294 294 /* Left margin: */ 295 #ifdef VBOX_WS_ X11295 #ifdef VBOX_WS_NIX 296 296 if (uiCommon().isCompositingManagerRunning()) 297 297 m_spacings << widgetForAction(addWidget(new QWidget)); 298 #else /* !VBOX_WS_ X11*/298 #else /* !VBOX_WS_NIX */ 299 299 m_spacings << widgetForAction(addWidget(new QWidget)); 300 #endif /* !VBOX_WS_ X11*/300 #endif /* !VBOX_WS_NIX */ 301 301 302 302 /* Prepare push-pin: */ … … 348 348 349 349 /* Right margin: */ 350 #ifdef VBOX_WS_ X11350 #ifdef VBOX_WS_NIX 351 351 if (uiCommon().isCompositingManagerRunning()) 352 352 m_spacings << widgetForAction(addWidget(new QWidget)); 353 #else /* !VBOX_WS_ X11*/353 #else /* !VBOX_WS_NIX */ 354 354 m_spacings << widgetForAction(addWidget(new QWidget)); 355 #endif /* !VBOX_WS_ X11*/355 #endif /* !VBOX_WS_NIX */ 356 356 } 357 357 358 358 void UIMiniToolBarPrivate::rebuildShape() 359 359 { 360 #ifdef VBOX_WS_ X11360 #ifdef VBOX_WS_NIX 361 361 if (!uiCommon().isCompositingManagerRunning()) 362 362 return; 363 #endif /* VBOX_WS_ X11*/363 #endif /* VBOX_WS_NIX */ 364 364 365 365 /* Rebuild shape: */ … … 409 409 Q_UNUSED(geometryType); 410 410 411 #ifdef VBOX_WS_ X11411 #ifdef VBOX_WS_NIX 412 412 /* Depending on current WM: */ 413 413 switch (uiCommon().typeOfWindowManager()) … … 428 428 default: break; 429 429 } 430 #endif /* VBOX_WS_ X11*/430 #endif /* VBOX_WS_NIX */ 431 431 432 432 /* Frameless window by default: */ … … 454 454 , m_pHoverLeaveTimer(0) 455 455 , m_pAnimation(0) 456 #ifdef VBOX_WS_ X11456 #ifdef VBOX_WS_NIX 457 457 , m_fIsParentMinimized(false) 458 458 #endif … … 555 555 m_pToolbar->move(m_hiddenToolbarPosition); 556 556 557 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)557 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 558 558 /* Adjust window mask: */ 559 559 setMask(m_pToolbar->geometry()); 560 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/560 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 561 561 } 562 562 … … 569 569 /* Just call the method asynchronously, after possible popups opened: */ 570 570 QTimer::singleShot(0, this, SLOT(sltCheckWindowActivationSanity())); 571 #elif defined(VBOX_WS_ X11)571 #elif defined(VBOX_WS_NIX) 572 572 // WORKAROUND: 573 573 // Under certain WMs we can receive stolen activation event too early, … … 576 576 // so we are going to check for window activation in let's say 100ms. 577 577 QTimer::singleShot(100, this, SLOT(sltCheckWindowActivationSanity())); 578 #endif /* VBOX_WS_ X11*/578 #endif /* VBOX_WS_NIX */ 579 579 } 580 580 … … 648 648 break; 649 649 } 650 #ifdef VBOX_WS_ X11650 #ifdef VBOX_WS_NIX 651 651 case QEvent::WindowStateChange: 652 652 { … … 694 694 break; 695 695 } 696 #endif /* VBOX_WS_ X11*/696 #endif /* VBOX_WS_NIX */ 697 697 default: 698 698 break; … … 818 818 hide(); 819 819 820 #elif defined(VBOX_WS_ X11)820 #elif defined(VBOX_WS_NIX) 821 821 822 822 /* Just hide window: */ … … 869 869 } 870 870 871 #elif defined(VBOX_WS_ X11)871 #elif defined(VBOX_WS_NIX) 872 872 873 873 /* Show window in necessary mode: */ … … 979 979 } 980 980 981 #elif defined(VBOX_WS_ X11)981 #elif defined(VBOX_WS_NIX) 982 982 983 983 switch (m_geometryType) … … 1073 1073 /* Enable translucency through Qt API: */ 1074 1074 setAttribute(Qt::WA_TranslucentBackground); 1075 #elif defined(VBOX_WS_ X11)1075 #elif defined(VBOX_WS_NIX) 1076 1076 /* Enable translucency through Qt API if supported: */ 1077 1077 if (uiCommon().isCompositingManagerRunning()) 1078 1078 setAttribute(Qt::WA_TranslucentBackground); 1079 #endif /* VBOX_WS_ X11*/1079 #endif /* VBOX_WS_NIX */ 1080 1080 1081 1081 /* Make sure we have no focus: */ … … 1147 1147 adjustGeometry(); 1148 1148 1149 #ifdef VBOX_WS_ X111149 #ifdef VBOX_WS_NIX 1150 1150 /* Hide mini-toolbar from taskbar and pager: */ 1151 1151 NativeWindowSubsystem::X11SetSkipTaskBarFlag(this); … … 1191 1191 m_pToolbar->move(point); 1192 1192 1193 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)1193 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 1194 1194 /* Update window mask: */ 1195 1195 setMask(m_pToolbar->geometry()); 1196 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/1196 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 1197 1197 } 1198 1198 … … 1206 1206 bool UIMiniToolBar::isParentMinimized() const 1207 1207 { 1208 #ifdef VBOX_WS_ X111208 #ifdef VBOX_WS_NIX 1209 1209 return m_fIsParentMinimized; 1210 1210 #else -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
r98103 r100064 212 212 UIAnimation *m_pAnimation; 213 213 214 #ifdef VBOX_WS_ X11214 #ifdef VBOX_WS_NIX 215 215 /** X11: Holds whether the parent is currently minimized. 216 216 * Used to restore the full-screen/maximized state -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneDetails.cpp
r98103 r100064 263 263 #if defined(VBOX_WS_MAC) 264 264 font.setPointSize(font.pointSize() - 2); 265 #elif defined(VBOX_WS_ X11)265 #elif defined(VBOX_WS_NIX) 266 266 font.setPointSize(font.pointSize() - 1); 267 267 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneMessage.cpp
r98103 r100064 213 213 #if defined(VBOX_WS_MAC) 214 214 font.setPointSize(font.pointSize() - 2); 215 #elif defined(VBOX_WS_ X11)215 #elif defined(VBOX_WS_NIX) 216 216 font.setPointSize(font.pointSize() - 1); 217 217 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingToolBar.cpp
r98103 r100064 136 136 /* Use Qt API to enable translucency: */ 137 137 setAttribute(Qt::WA_TranslucentBackground); 138 #elif defined(VBOX_WS_ X11)138 #elif defined(VBOX_WS_NIX) 139 139 if (uiCommon().isCompositingManagerRunning()) 140 140 { … … 142 142 setAttribute(Qt::WA_TranslucentBackground); 143 143 } 144 #endif /* VBOX_WS_ X11*/144 #endif /* VBOX_WS_NIX */ 145 145 146 146 /* Prepare contents: */ … … 212 212 } 213 213 214 #ifdef VBOX_WS_ X11214 #ifdef VBOX_WS_NIX 215 215 if (!uiCommon().isCompositingManagerRunning()) 216 216 { … … 270 270 m_pWidget->setGeometry(0, 0, qMax(width(), sh.width()), sh.height()); 271 271 272 #ifdef VBOX_WS_ X11272 #ifdef VBOX_WS_NIX 273 273 if (!uiCommon().isCompositingManagerRunning()) 274 274 { … … 306 306 m_pWidget->setGeometry(rect); 307 307 308 #ifdef VBOX_WS_ X11308 #ifdef VBOX_WS_NIX 309 309 if (!uiCommon().isCompositingManagerRunning()) 310 310 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIStatusBarEditorWindow.cpp
r100030 r100064 525 525 color1.setAlpha(0); 526 526 QColor color2 = pal.color(QPalette::Window).darker(200); 527 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)527 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 528 528 QColor color3 = pal.color(QPalette::Window).darker(120); 529 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/529 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 530 530 531 531 /* Acquire metric: */ … … 571 571 painter.fillRect(QRect(width() - iMetric, iMetric, iMetric, height() - iMetric), grad5); // right line 572 572 573 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_ X11)573 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX) 574 574 /* Paint frames: */ 575 575 painter.save(); … … 584 584 QPoint(iMetric + 1, iMetric + 1))); 585 585 painter.restore(); 586 #endif /* VBOX_WS_WIN || VBOX_WS_ X11*/586 #endif /* VBOX_WS_WIN || VBOX_WS_NIX */ 587 587 588 588 /* Paint drop token: */
Note:
See TracChangeset
for help on using the changeset viewer.