Changeset 85286 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jul 12, 2020 11:08:50 PM (5 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r84618 r85286 7358 7358 AssertComRCReturnRC(autoCaller.rc()); 7359 7359 7360 VBoxEventDesc evDesc;7360 ComPtr<IEvent> ptrEvent; 7361 7361 if (aCheck) 7362 7362 { 7363 evDesc.init(mEventSource, VBoxEventType_OnCanShowWindow); 7364 BOOL fDelivered = evDesc.fire(5000); /* Wait up to 5 secs for delivery */ 7365 //Assert(fDelivered); 7366 if (fDelivered) 7367 { 7368 ComPtr<IEvent> pEvent; 7369 evDesc.getEvent(pEvent.asOutParam()); 7370 // bit clumsy 7371 ComPtr<ICanShowWindowEvent> pCanShowEvent = pEvent; 7372 if (pCanShowEvent) 7363 *aCanShow = TRUE; 7364 HRESULT hrc = CreateCanShowWindowEvent(ptrEvent.asOutParam(), mEventSource); 7365 if (SUCCEEDED(hrc)) 7366 { 7367 VBoxEventDesc EvtDesc(ptrEvent, mEventSource); 7368 BOOL fDelivered = EvtDesc.fire(5000); /* Wait up to 5 secs for delivery */ 7369 //Assert(fDelivered); 7370 if (fDelivered) 7373 7371 { 7374 BOOL fVetoed = FALSE; 7375 BOOL fApproved = FALSE; 7376 pCanShowEvent->IsVetoed(&fVetoed); 7377 pCanShowEvent->IsApproved(&fApproved); 7378 *aCanShow = fApproved || !fVetoed; 7372 // bit clumsy 7373 ComPtr<ICanShowWindowEvent> ptrCanShowEvent = ptrEvent; 7374 if (ptrCanShowEvent) 7375 { 7376 BOOL fVetoed = FALSE; 7377 BOOL fApproved = FALSE; 7378 ptrCanShowEvent->IsVetoed(&fVetoed); 7379 ptrCanShowEvent->IsApproved(&fApproved); 7380 *aCanShow = fApproved || !fVetoed; 7381 } 7382 else 7383 AssertFailed(); 7379 7384 } 7380 else 7385 } 7386 } 7387 else 7388 { 7389 HRESULT hrc = CreateShowWindowEvent(ptrEvent.asOutParam(), mEventSource, 0); 7390 if (SUCCEEDED(hrc)) 7391 { 7392 VBoxEventDesc EvtDesc(ptrEvent, mEventSource); 7393 BOOL fDelivered = EvtDesc.fire(5000); /* Wait up to 5 secs for delivery */ 7394 //Assert(fDelivered); 7395 if (fDelivered) 7381 7396 { 7382 AssertFailed(); 7383 *aCanShow = TRUE; 7397 ComPtr<IShowWindowEvent> ptrShowEvent = ptrEvent; 7398 if (ptrShowEvent) 7399 { 7400 LONG64 idWindow = 0; 7401 ptrShowEvent->COMGETTER(WinId)(&idWindow); 7402 if (idWindow != 0 && *aWinId == 0) 7403 *aWinId = idWindow; 7404 } 7405 else 7406 AssertFailed(); 7384 7407 } 7385 }7386 else7387 *aCanShow = TRUE;7388 }7389 else7390 {7391 evDesc.init(mEventSource, VBoxEventType_OnShowWindow, INT64_C(0));7392 BOOL fDelivered = evDesc.fire(5000); /* Wait up to 5 secs for delivery */7393 //Assert(fDelivered);7394 if (fDelivered)7395 {7396 ComPtr<IEvent> pEvent;7397 evDesc.getEvent(pEvent.asOutParam());7398 ComPtr<IShowWindowEvent> pShowEvent = pEvent;7399 if (pShowEvent)7400 {7401 LONG64 iEvWinId = 0;7402 pShowEvent->COMGETTER(WinId)(&iEvWinId);7403 if (iEvWinId != 0 && *aWinId == 0)7404 *aWinId = iEvWinId;7405 }7406 else7407 AssertFailed();7408 7408 } 7409 7409 } -
trunk/src/VBox/Main/src-client/KeyboardImpl.cpp
r82968 r85286 23 23 24 24 #include "AutoCaller.h" 25 #include "VBoxEvents.h" 25 26 26 27 #include <VBox/com/array.h> … … 212 213 keys[i] = aScancodes[i]; 213 214 214 VBoxEventDesc evDesc; 215 evDesc.init(mEventSource, VBoxEventType_OnGuestKeyboard, ComSafeArrayAsInParam(keys)); 216 evDesc.fire(0); 215 fireGuestKeyboardEvent(mEventSource, ComSafeArrayAsInParam(keys)); 217 216 218 217 if (RT_FAILURE(vrc)) -
trunk/src/VBox/Main/src-client/MouseImpl.cpp
r82968 r85286 25 25 #include "VMMDev.h" 26 26 #include "MousePointerShapeWrap.h" 27 #include "VBoxEvents.h" 27 28 28 29 #include <VBox/vmm/pdmdrv.h> … … 266 267 HRESULT rc = mEventSource->init(); 267 268 AssertComRCReturnRC(rc); 268 mMouseEvent.init(mEventSource, VBoxEventType_OnGuestMouse, 269 0, 0, 0, 0, 0, 0); 269 270 ComPtr<IEvent> ptrEvent; 271 rc = CreateGuestMouseEvent(ptrEvent.asOutParam(), mEventSource, 272 (GuestMouseEventMode_T)0, 0 /*x*/, 0 /*y*/, 0 /*z*/, 0 /*w*/, 0 /*buttons*/); 273 AssertComRCReturnRC(rc); 274 mMouseEvent.init(ptrEvent, mEventSource); 270 275 271 276 /* Confirm a successful initialization */ … … 688 693 689 694 if (fButtons != 0) 690 { 691 VBoxEventDesc evDesc; 692 evDesc.init(mEventSource, VBoxEventType_OnGuestMouse, mode, x, y, 693 dz, dw, fButtons); 694 evDesc.fire(0); 695 } 695 fireGuestMouseEvent(mEventSource, mode, x, y, dz, dw, fButtons); 696 696 else 697 697 { 698 mMouseEvent.reinit(VBoxEventType_OnGuestMouse, mode, x, y, dz, dw, 699 fButtons); 698 ComPtr<IEvent> ptrEvent; 699 mMouseEvent.getEvent(ptrEvent.asOutParam()); 700 ReinitGuestMouseEvent(ptrEvent, mode, x, y, dz, dw, fButtons); 700 701 mMouseEvent.fire(0); 701 702 } … … 722 723 } 723 724 724 VBoxEventDesc evDesc; 725 evDesc.init(mEventSource, VBoxEventType_OnGuestMultiTouch, 726 cContacts, ComSafeArrayAsInParam(xPositions), ComSafeArrayAsInParam(yPositions), 727 ComSafeArrayAsInParam(contactIds), ComSafeArrayAsInParam(contactFlags), u32ScanTime); 728 evDesc.fire(0); 725 fireGuestMultiTouchEvent(mEventSource, cContacts, ComSafeArrayAsInParam(xPositions), ComSafeArrayAsInParam(yPositions), 726 ComSafeArrayAsInParam(contactIds), ComSafeArrayAsInParam(contactFlags), u32ScanTime); 729 727 } 730 728
Note:
See TracChangeset
for help on using the changeset viewer.