- Timestamp:
- Dec 17, 2013 8:20:45 PM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
r49957 r49965 1281 1281 IOReturn rc = kIOReturnError; 1282 1282 1283 /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */1284 int rc1 = SUPR3Resume BuiltinKeyboard();1283 /* Try to resume suspended keyboard devices. Abort if failed in order to avoid GUI freezes. */ 1284 int rc1 = SUPR3ResumeSuspendedKeyboards(); 1285 1285 if (RT_FAILURE(rc1)) 1286 1286 return rc1; … … 1308 1308 CFIndex integerValue; 1309 1309 1310 /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */1311 int rc1 = SUPR3Resume BuiltinKeyboard();1310 /* Try to resume suspended keyboard devices. Abort if failed in order to avoid GUI freezes. */ 1311 int rc1 = SUPR3ResumeSuspendedKeyboards(); 1312 1312 if (RT_FAILURE(rc1)) 1313 1313 return rc1; -
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r49787 r49965 139 139 RTCPUID idCpu, uint8_t idApic, uint64_t iTick); 140 140 static void supdrvGipInitCpu(PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pCpu, uint64_t u64NanoTS); 141 static int supdrvIOCtl_Resume BuiltinKbd(void);141 static int supdrvIOCtl_ResumeSuspendedKbds(void); 142 142 143 143 … … 1905 1905 } 1906 1906 1907 case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_RESUME_ BUILTIN_KBD):1907 case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_RESUME_SUSPENDED_KBDS): 1908 1908 { 1909 1909 /* validate */ 1910 REQ_CHECK_SIZES(SUP_IOCTL_RESUME_ BUILTIN_KBD);1911 1912 pReqHdr->rc = supdrvIOCtl_Resume BuiltinKbd();1910 REQ_CHECK_SIZES(SUP_IOCTL_RESUME_SUSPENDED_KBDS); 1911 1912 pReqHdr->rc = supdrvIOCtl_ResumeSuspendedKbds(); 1913 1913 return 0; 1914 1914 } … … 6155 6155 * @returns 0 on Mac OS X platform, VERR_NOT_IMPLEMENTED on the other ones. 6156 6156 */ 6157 static int supdrvIOCtl_Resume BuiltinKbd(void)6157 static int supdrvIOCtl_ResumeSuspendedKbds(void) 6158 6158 { 6159 6159 #if defined(RT_OS_DARWIN) 6160 return supdrvDarwinResume BuiltinKbd();6160 return supdrvDarwinResumeSuspendedKbds(); 6161 6161 #else 6162 6162 return VERR_NOT_IMPLEMENTED; -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r49787 r49965 1438 1438 /** @} */ 1439 1439 1440 /** @name SUP_IOCTL_RESUME_ BUILTIN_KBD1441 * Resume built-in keyboard (make sense on MacBook Air/Pro hosts only).1442 * 1443 * @{ 1444 */ 1445 #define SUP_IOCTL_RESUME_ BUILTIN_KBD SUP_CTL_CODE_SIZE(35, SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE)1446 #define SUP_IOCTL_RESUME_ BUILTIN_KBD_SIZEsizeof(SUPREQHDR)1447 #define SUP_IOCTL_RESUME_ BUILTIN_KBD_SIZE_INsizeof(SUPREQHDR)1448 #define SUP_IOCTL_RESUME_ BUILTIN_KBD_SIZE_OUTsizeof(SUPREQHDR)1440 /** @name SUP_IOCTL_RESUME_SUSPENDED_KBDS 1441 * Resume suspended keyboard devices if any found in the system. 1442 * 1443 * @{ 1444 */ 1445 #define SUP_IOCTL_RESUME_SUSPENDED_KBDS SUP_CTL_CODE_SIZE(35, SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE) 1446 #define SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE sizeof(SUPREQHDR) 1447 #define SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_IN sizeof(SUPREQHDR) 1448 #define SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_OUT sizeof(SUPREQHDR) 1449 1449 /** @} */ 1450 1450 -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r49787 r49965 750 750 751 751 #if defined(RT_OS_DARWIN) 752 int VBOXCALL supdrvDarwinResume BuiltinKbd(void);752 int VBOXCALL supdrvDarwinResumeSuspendedKbds(void); 753 753 #endif 754 754 -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r49787 r49965 2134 2134 2135 2135 2136 SUPR3DECL(int) SUPR3Resume BuiltinKeyboard(void)2136 SUPR3DECL(int) SUPR3ResumeSuspendedKeyboards(void) 2137 2137 { 2138 2138 #ifdef RT_OS_DARWIN … … 2143 2143 Req.u32Cookie = g_u32Cookie; 2144 2144 Req.u32SessionCookie= g_u32SessionCookie; 2145 Req.cbIn = SUP_IOCTL_RESUME_ BUILTIN_KBD_SIZE_IN;2146 Req.cbOut = SUP_IOCTL_RESUME_ BUILTIN_KBD_SIZE_OUT;2145 Req.cbIn = SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_IN; 2146 Req.cbOut = SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_OUT; 2147 2147 Req.fFlags = SUPREQHDR_FLAGS_DEFAULT; 2148 2148 Req.rc = VERR_INTERNAL_ERROR; 2149 int rc = suplibOsIOCtl(&g_supLibData, SUP_IOCTL_RESUME_ BUILTIN_KBD, &Req, SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE);2149 int rc = suplibOsIOCtl(&g_supLibData, SUP_IOCTL_RESUME_SUSPENDED_KBDS, &Req, SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE); 2150 2150 if (RT_SUCCESS(rc)) 2151 2151 rc = Req.rc; -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r49955 r49965 68 68 #include <IOKit/IODeviceTreeSupport.h> 69 69 #include <IOKit/usb/IOUSBHIDDriver.h> 70 #include <IOKit/bluetooth/IOBluetoothHIDDriver.h> 71 #include <IOKit/bluetooth/IOBluetoothHIDDriverTypes.h> 70 72 71 73 #ifdef VBOX_WITH_HOST_VMX … … 1147 1149 #endif /* SUPDRV_WITH_MSR_PROBER */ 1148 1150 1151 /** 1152 * Resume Bluetooth keyboard. 1153 * If there is no Bluetooth keyboard device connected to the system we just ignore this. 1154 */ 1155 static void supdrvDarwinResumeBluetoothKbd(void) 1156 { 1157 OSDictionary *pDictionary = IOService::serviceMatching("AppleBluetoothHIDKeyboard"); 1158 if (pDictionary) 1159 { 1160 OSIterator *pIter; 1161 IOBluetoothHIDDriver *pDriver; 1162 1163 pIter = IOService::getMatchingServices(pDictionary); 1164 if (pIter) 1165 { 1166 while ((pDriver = (IOBluetoothHIDDriver *)pIter->getNextObject())) 1167 if (pDriver->isKeyboard()) 1168 (void)pDriver->hidControl(IOBTHID_CONTROL_EXIT_SUSPEND); 1169 1170 pIter->release(); 1171 } 1172 pDictionary->release(); 1173 } 1174 } 1149 1175 1150 1176 /** 1151 1177 * Resume built-in keyboard on MacBook Air and Pro hosts. 1152 * If there is no built-in keyboard device , return success anyway.1153 */ 1154 int VBOXCALLsupdrvDarwinResumeBuiltinKbd(void)1178 * If there is no built-in keyboard device attached to the system we just ignore this. 1179 */ 1180 static void supdrvDarwinResumeBuiltinKbd(void) 1155 1181 { 1156 1182 /* … … 1174 1200 pDictionary->release(); 1175 1201 } 1202 } 1203 1204 1205 /** 1206 * Resume suspended keyboard devices (if any). 1207 */ 1208 int VBOXCALL supdrvDarwinResumeSuspendedKbds(void) 1209 { 1210 supdrvDarwinResumeBuiltinKbd(); 1211 supdrvDarwinResumeBluetoothKbd(); 1176 1212 1177 1213 return 0; 1178 1214 } 1179 1180 1215 1181 1216
Note:
See TracChangeset
for help on using the changeset viewer.