Changeset 16699 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 11, 2009 8:56:58 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 42711
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r16698 r16699 4063 4063 * 4064 4064 * Called by eventFilter() and darwinGrabKeyboardEvents(). 4065 * 4065 4066 * @param aOn Switch it on (true) or off (false). 4066 4067 */ 4067 4068 void VBoxConsoleView::setMouseCoalescingEnabled (bool aOn) 4068 4069 { 4070 /* Enable mouse event compression if we leave the VM view. This 4071 is necessary for having smooth resizing of the VM/other 4072 windows. 4073 Disable mouse event compression if we enter the VM view. So 4074 all mouse events are registered in the VM. Only do this if 4075 the keyboard/mouse is grabbed (this is when we have a valid 4076 event handler). */ 4077 if (aOn || mKeyboardGrabbed) 4069 4078 # ifdef QT_MAC_USE_COCOA 4070 /** @todo Carbon -> Cocoa: SetMouseCoalescingEnabled() is 32-bit only. */4079 ::VBoxCocoaApplication_setMouseCoalescingEnabled (aOn); 4071 4080 # else 4072 if (aOn) 4073 /* Enable mouse event compression if we leave the VM view. This 4074 is necessary for having smooth resizing of the VM/other 4075 windows. */ 4076 ::SetMouseCoalescingEnabled (true, NULL); 4077 else 4078 { 4079 /* Disable mouse event compression if we enter the VM view. So 4080 all mouse events are registered in the VM. Only do this if 4081 the keyboard/mouse is grabbed (this is when we have a valid 4082 event handler). */ 4083 if (mKeyboardGrabbed) 4084 ::SetMouseCoalescingEnabled (false, NULL); 4085 } 4081 ::SetMouseCoalescingEnabled (aOn, NULL); 4086 4082 # endif 4087 4083 } -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxCocoaApplication.h
r16693 r16699 80 80 81 81 /** @name The C/C++ interface. 82 * 83 * @remarks This is a bit illogical as both NSApplication and NSEvent stuff 84 * ended up here... 82 85 * @{ 83 86 */ … … 87 90 unsigned long VBoxCocoaApplication_getEventModifierFlags(const void *pvEvent); 88 91 uint32_t VBoxCocoaApplication_getEventModifierFlagsXlated(const void *pvEvent); 92 void VBoxCocoaApplication_setMouseCoalescingEnabled(bool fEnabled); 89 93 const char *VBoxCocoaApplication_eventTypeName(unsigned long eEvtType); 90 94 void VBoxCocoaApplication_printEvent(const char *pszPrefix, const void *pvEvent); 91 92 93 95 /** @} */ 94 96 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxCocoaApplication.m
r16693 r16699 289 289 290 290 return fCarbon; 291 } 292 293 294 /** 295 * Calls the + (void)setMouseCoalescingEnabled:(BOOL)flag class method. 296 * 297 * @param fEnabled Whether to enable or disable coalescing. 298 */ 299 void VBoxCocoaApplication_setMouseCoalescingEnabled(bool fEnabled) 300 { 301 [NSEvent setMouseCoalescingEnabled:fEnabled]; 291 302 } 292 303
Note:
See TracChangeset
for help on using the changeset viewer.