Changeset 26469 in vbox
- Timestamp:
- Feb 12, 2010 5:12:27 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
-
VBoxConsoleWnd.cpp (modified) (1 diff)
-
VBoxGlobalSettings.h (modified) (3 diffs)
-
X11/VBoxX11Helper.cpp (modified) (2 diffs)
-
X11/VBoxX11Helper.h (modified) (1 diff)
-
globals/VBoxGlobal.cpp (modified) (3 diffs)
-
globals/VBoxGlobal.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r26468 r26469 2810 2810 2811 2811 #ifdef Q_WS_X11 2812 if (!mIsSeamless && !mIsFullscreen) 2813 { 2814 /* Workaround for KDE to 2815 * let console window to exit 2812 if (vboxGlobal().isKWinManaged() && !mIsSeamless && !mIsFullscreen) 2813 { 2814 /* Workaround for a KWin bug to let console window to exit 2816 2815 * seamless mode correctly. */ 2817 2816 setWindowFlags(Qt::Window); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
r25318 r26469 44 44 int hostkey; 45 45 bool autoCapture; 46 bool captureMouseOnClick; 46 47 QString guiFeatures; 47 48 QString languageId; … … 62 63 Q_PROPERTY (int hostKey READ hostKey WRITE setHostKey) 63 64 Q_PROPERTY (bool autoCapture READ autoCapture WRITE setAutoCapture) 65 Q_PROPERTY (bool captureMouseOnClick READ captureMouseOnClick WRITE setCaptureMouseOnClick) 64 66 Q_PROPERTY (QString guiFeatures READ guiFeatures WRITE setGuiFeatures) 65 67 Q_PROPERTY (QString languageId READ languageId WRITE setLanguageId) … … 90 92 { 91 93 mData()->autoCapture = aAutoCapture; 94 resetError(); 95 } 96 97 bool captureMouseOnClick() const { return data()->captureMouseOnClick; } 98 void setCaptureMouseOnClick (bool aCaptureMouseOnClick) 99 { 100 mData()->captureMouseOnClick = aCaptureMouseOnClick; 92 101 resetError(); 93 102 } -
trunk/src/VBox/Frontends/VirtualBox/src/X11/VBoxX11Helper.cpp
r25171 r26469 24 24 25 25 #include <iprt/cdefs.h> 26 #include <iprt/string.h> 26 27 #include <QX11Info> 27 28 28 29 /* rhel3 build hack */ 29 30 RT_C_DECLS_BEGIN 31 #include <X11/Xatom.h> 30 32 #include <X11/Xlib.h> 31 33 #include <X11/extensions/dpms.h> … … 84 86 DPMSEnable(display); 85 87 } 88 89 /** 90 * Determine if the current Window manager is KWin (KDE) 91 */ 92 bool X11IsWindowManagerKWin() 93 { 94 Atom typeReturned; 95 Atom utf8Atom; 96 int formatReturned; 97 unsigned long ulNitemsReturned; 98 unsigned long ulDummy; 99 unsigned char *pcData = NULL; 100 bool fIsKWinManaged = false; 101 Display *display = QX11Info::display(); 102 Atom propNameAtom; 103 Window WMWindow = None; 104 105 propNameAtom = XInternAtom(display, "_NET_SUPPORTING_WM_CHECK", True); 106 if (XGetWindowProperty(display, QX11Info::appRootWindow(), propNameAtom, 107 0, 512, False, XA_WINDOW, &typeReturned, 108 &formatReturned, &ulNitemsReturned, &ulDummy, &pcData) 109 == Success) 110 { 111 112 if (typeReturned == XA_WINDOW && formatReturned == 32) 113 WMWindow = *((Window*) pcData); 114 if (pcData) 115 XFree(pcData); 116 if (WMWindow != None) 117 { 118 propNameAtom = XInternAtom(display, "_NET_WM_NAME", True); 119 utf8Atom = XInternAtom(display, "UTF8_STRING", True); 120 if (XGetWindowProperty(QX11Info::display(), WMWindow, propNameAtom, 121 0, 512, False, utf8Atom, &typeReturned, 122 &formatReturned, &ulNitemsReturned, &ulDummy, &pcData) 123 == Success) 124 { 125 fIsKWinManaged = RTStrCmp((const char*)pcData, "KWin") == 0; 126 if (pcData) 127 XFree(pcData); 128 } 129 } 130 } 131 return fIsKWinManaged; 132 } -
trunk/src/VBox/Frontends/VirtualBox/src/X11/VBoxX11Helper.h
r25171 r26469 27 27 void X11ScreenSaverSettingsSave(); 28 28 void X11ScreenSaverSettingsRestore(); 29 bool X11IsWindowManagerKWin(); 29 30 30 31 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r26460 r26469 63 63 64 64 #ifdef Q_WS_X11 65 # ifndef VBOX_OSE66 # include "VBoxLicenseViewer.h"67 # endif /* VBOX_OSE */68 69 # include <QTextBrowser>70 # include <QScrollBar>71 # include <QX11Info>65 # ifndef VBOX_OSE 66 # include "VBoxLicenseViewer.h" 67 # endif /* VBOX_OSE */ 68 # include <QTextBrowser> 69 # include <QScrollBar> 70 # include <QX11Info> 71 # include "VBoxX11Helper.h" 72 72 #endif 73 73 … … 590 590 #endif 591 591 , mMediaEnumThread (NULL) 592 , mIsKWinManaged (false) 592 593 , mVerString ("1.0") 593 594 { … … 4779 4780 .GetExtraData (VBoxDefs::GUI_RenderMode).toAscii().constData()); 4780 4781 4782 #ifdef QT_WS_X11 4783 mIsKWin = X11IsWindowManagerKWin(); 4784 #endif 4785 4781 4786 #ifdef VBOX_WITH_DEBUGGER_GUI 4782 4787 # ifdef VBOX_WITH_DEBUGGER_GUI_MENU -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r26460 r26469 324 324 VBoxDefs::RenderMode vmRenderMode() const { return vm_render_mode; } 325 325 const char *vmRenderModeStr() const { return vm_render_mode_str; } 326 bool isKWinManaged() const { return mIsKWinManaged; } 326 327 327 328 #ifdef VBOX_WITH_DEBUGGER_GUI … … 917 918 VBoxDefs::RenderMode vm_render_mode; 918 919 const char * vm_render_mode_str; 920 bool mIsKWinManaged; 919 921 920 922 #ifdef VBOX_WITH_DEBUGGER_GUI
Note:
See TracChangeset
for help on using the changeset viewer.

