儲存庫 vbox 的更動 18565
- 時間撮記:
- 2009-3-31 下午12:24:11 (16 年 以前)
- 位置:
- trunk/src/VBox
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxUtils-darwin.h
r17340 r18565 222 222 { 223 223 /* Event classes */ 224 kEventClassVBox = 'vbox',224 kEventClassVBox = 'vbox', 225 225 /* Event kinds */ 226 kEventVBoxShowWindow = 'swin', 227 kEventVBoxMoveWindow = 'mwin', 228 kEventVBoxResizeWindow = 'rwin', 229 kEventVBoxUpdateDock = 'udck' 226 kEventVBoxShowWindow = 'swin', 227 kEventVBoxHideWindow = 'hwin', 228 kEventVBoxMoveWindow = 'mwin', 229 kEventVBoxResizeWindow = 'rwin', 230 kEventVBoxDisposeWindow = 'dwin', 231 kEventVBoxUpdateDock = 'udck' 230 232 }; 231 233 OSStatus darwinOverlayWindowHandler (EventHandlerCallRef aInHandlerCallRef, EventRef aInEvent, void *aInUserData); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r17669 r18565 766 766 { 767 767 { kEventClassVBox, kEventVBoxShowWindow }, 768 { kEventClassVBox, kEventVBoxHideWindow }, 768 769 { kEventClassVBox, kEventVBoxMoveWindow }, 769 770 { kEventClassVBox, kEventVBoxResizeWindow }, 771 { kEventClassVBox, kEventVBoxDisposeWindow }, 770 772 { kEventClassVBox, kEventVBoxUpdateDock } 771 773 }; -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-carbon.cpp
r17201 r18565 235 235 return noErr; 236 236 } 237 if (eventKind == kEventVBoxHideWindow) 238 { 239 // printf ("HideWindow requested\n"); 240 WindowPtr w; 241 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr) 242 return noErr; 243 HideWindow (w); 244 return noErr; 245 } 237 246 if (eventKind == kEventVBoxMoveWindow) 238 247 { … … 246 255 ChangeWindowGroupAttributes (GetWindowGroup (w), 0, kWindowGroupAttrMoveTogether); 247 256 QPoint p1 = view->mapToGlobal (QPoint (p.x, p.y)); 257 // printf ("Pos: %d %d\n", p1.x(), p1.y()); 248 258 MoveWindow (w, p1.x(), p1.y(), true); 249 259 ChangeWindowGroupAttributes (GetWindowGroup (w), kWindowGroupAttrMoveTogether, 0); … … 260 270 return noErr; 261 271 ChangeWindowGroupAttributes (GetWindowGroup (w), 0, kWindowGroupAttrMoveTogether); 272 // printf ("Size: %f %f\n", s.width, s.height); 262 273 SizeWindow (w, s.width, s.height, true); 263 274 ChangeWindowGroupAttributes (GetWindowGroup (w), kWindowGroupAttrMoveTogether, 0); 264 275 return noErr; 265 276 } 277 if (eventKind == kEventVBoxDisposeWindow) 278 { 279 // printf ("DisposeWindow requested\n"); 280 WindowPtr w; 281 if (GetEventParameter (aInEvent, kEventParamWindowRef, typeWindowRef, NULL, sizeof (w), NULL, &w) != noErr) 282 return noErr; 283 DisposeWindow (w); 284 return noErr; 285 } 266 286 if (eventKind == kEventVBoxUpdateDock) 267 287 { -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c
r17022 r18565 29 29 { 30 30 /* Event classes */ 31 kEventClassVBox = 'vbox',31 kEventClassVBox = 'vbox', 32 32 /* Event kinds */ 33 kEventVBoxShowWindow = 'swin', 34 kEventVBoxMoveWindow = 'mwin', 35 kEventVBoxResizeWindow = 'rwin', 36 kEventVBoxUpdateDock = 'udck' 33 kEventVBoxShowWindow = 'swin', 34 kEventVBoxHideWindow = 'hwin', 35 kEventVBoxMoveWindow = 'mwin', 36 kEventVBoxResizeWindow = 'rwin', 37 kEventVBoxDisposeWindow = 'dwin', 38 kEventVBoxUpdateDock = 'udck' 37 39 }; 38 40 … … 50 52 51 53 /* Debug macros */ 54 #ifdef DEBUG_poetzsch 55 #define DEBUG_MSG_POETZSCH(text) \ 56 printf text 57 #endif 58 52 59 #define DEBUG_MSG_RESULT(result, text) \ 53 60 crDebug(text" (%d; %s:%d)", (int)(result), __FILE__, __LINE__) … … 268 275 return render_spu.ws.aglSetCurrentContext( NULL ); 269 276 277 DEBUG_MSG_POETZSCH (("WindowAttachContext %d\n", wi->id)); 278 270 279 /* Flush old context first */ 271 280 if (context->currentWindow->window != window) … … 275 284 if (wi->bufferName == -1) 276 285 { 286 DEBUG_MSG_POETZSCH (("WindowAttachContext: create context %d\n", wi->id)); 277 287 /* Use the same visual bits as those in the context structure */ 278 288 AGLPixelFormat pix; … … 357 367 358 368 if(!window->nativeWindow) 359 DisposeWindow(window->window); 369 { 370 EventRef evt; 371 OSStatus status = CreateEvent(NULL, kEventClassVBox, kEventVBoxDisposeWindow, 0, kEventAttributeNone, &evt); 372 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: CreateEvent Failed"); 373 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window); 374 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: SetEventParameter Failed"); 375 status = SendEventToEventTarget (evt, GetWindowEventTarget (HIViewGetWindow ((HIViewRef)render_spu_parent_window_id))); 376 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: PostEventToQueue Failed"); 377 } 360 378 361 379 /* Delete the dummy context */ … … 390 408 status = SetEventParameter(evt, kEventParamDimensions, typeHISize, sizeof (s), &s); 391 409 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: SetEventParameter Failed"); 392 status = PostEventToQueue(GetMainEventQueue(), evt, kEventPriorityStandard);410 status = SendEventToEventTarget (evt, GetWindowEventTarget (HIViewGetWindow ((HIViewRef)render_spu_parent_window_id))); 393 411 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: PostEventToQueue Failed"); 394 412 … … 399 417 context->context) 400 418 { 419 DEBUG_MSG_POETZSCH (("Size %d context %x visible %d\n", window->id, context->context, IsWindowVisible (window->window))); 401 420 result = render_spu.ws.aglUpdateContext(context->context); 402 421 CHECK_AGL_RC (result, "Render SPU: UpdateContext Failed"); 422 render_spu.self.Flush(); 403 423 } 404 424 /* save the new size */ … … 464 484 status = SetEventParameter(evt, kEventParamOrigin, typeHIPoint, sizeof (p), &p); 465 485 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: SetEventParameter Failed"); 466 status = PostEventToQueue(GetMainEventQueue(), evt, kEventPriorityStandard);486 status = SendEventToEventTarget (evt, GetWindowEventTarget (HIViewGetWindow ((HIViewRef)render_spu_parent_window_id))); 467 487 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: PostEventToQueue Failed"); 468 488 … … 473 493 context->context) 474 494 { 495 DEBUG_MSG_POETZSCH (("Position %d context %x visible %d\n", window->id, context->context, IsWindowVisible (window->window))); 475 496 result = render_spu.ws.aglUpdateContext(context->context); 476 497 CHECK_AGL_RC (result, "Render SPU: UpdateContext Failed"); 498 render_spu.self.Flush(); 477 499 } 478 500 } … … 500 522 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window); 501 523 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: SetEventParameter Failed"); 502 status = PostEventToQueue(GetMainEventQueue(), evt, kEventPriorityStandard);524 status = SendEventToEventTarget (evt, GetWindowEventTarget (HIViewGetWindow ((HIViewRef)render_spu_parent_window_id))); 503 525 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: PostEventToQueue Failed"); 504 526 } 505 527 else 506 HideWindow(window->window); 528 { 529 EventRef evt; 530 OSStatus status = CreateEvent(NULL, kEventClassVBox, kEventVBoxHideWindow, 0, kEventAttributeNone, &evt); 531 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: CreateEvent Failed"); 532 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window); 533 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: SetEventParameter Failed"); 534 status = SendEventToEventTarget (evt, GetWindowEventTarget (HIViewGetWindow ((HIViewRef)render_spu_parent_window_id))); 535 CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU: PostEventToQueue Failed"); 536 } 507 537 508 538 /* Update the context */ … … 512 542 context->context) 513 543 { 544 DEBUG_MSG_POETZSCH (("Showed %d context %x visible %d\n", window->id, context->context, IsWindowVisible (window->window))); 514 545 result = render_spu.ws.aglUpdateContext(context->context); 515 546 CHECK_AGL_RC (result, "Render SPU: UpdateContext Failed"); 547 render_spu.self.Flush(); 516 548 } 517 549 … … 524 556 { 525 557 Boolean result; 558 DEBUG_MSG_POETZSCH (("makecurrent %d: \n", window->id)); 526 559 527 560 CRASSERT(render_spu.ws.aglSetCurrentContext); 528 /* crDebug( "renderspu_SystemMakeCurrent( %x, %i, %x )", window, nativeWindow, context );*/ 561 crDebug( "renderspu_SystemMakeCurrent( %x, %i, %x )", window, nativeWindow, context ); 529 562 530 563 if(window && context) … … 578 611 crError("Render SPU: SwapBuffers got a null context from the window"); 579 612 613 DEBUG_MSG_POETZSCH (("Swapped %d context %x visible: %d\n", window->id, context->context, IsWindowVisible (window->window))); 580 614 render_spu.ws.aglSwapBuffers(context->context); 581 582 615 583 616 /* This method seems called very often. To prevent the dock using all free … … 650 683 651 684 if(window->window && IsValidWindowPtr(window->window)) 652 /* Destroy the old one */ 653 DisposeWindow(window->window); 685 { 686 EventRef evt; 687 status = CreateEvent(NULL, kEventClassVBox, kEventVBoxDisposeWindow, 0, kEventAttributeNone, &evt); 688 CHECK_CARBON_RC_RETURN (status, "Render SPU: CreateEvent Failed", false); 689 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window); 690 CHECK_CARBON_RC_RETURN (status, "Render SPU: SetEventParameter Failed", false); 691 status = SendEventToEventTarget (evt, GetWindowEventTarget (HIViewGetWindow ((HIViewRef)render_spu_parent_window_id))); 692 CHECK_CARBON_RC_RETURN (status, "Render SPU: PostEventToQueue Failed", false); 693 } 654 694 655 695 windowRect.left = window->x;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器