Ticket #578: osxWindowHide.patch
File osxWindowHide.patch, 2.1 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/videoout_quartz.cpp
52 52 #import <CoreGraphics/CGBase.h> 53 53 #import <CoreGraphics/CGDisplayConfiguration.h> 54 54 #import <CoreGraphics/CGImage.h> 55 #import <Carbon/Carbon.h>56 55 #import <QuickTime/QuickTime.h> 57 56 58 57 class VideoOutputQuartzView; … … 1391 1390 tmp->SetFrameSkip(gContext->GetNumSetting("MacMainSkip", 0)); 1392 1391 data->views.append(tmp); 1393 1392 } 1393 else { 1394 //if video in the main window is not enabled, hide it so it is not in the way 1395 Rect theBounds; 1396 GetWindowBounds (data->window, kWindowStructureRgn, &theBounds); 1397 defaultWindowBounds = theBounds; 1398 SizeWindow(data->window, 1, 1, true); 1399 //todo -- it would be nice if we could see the mouse when in windowed mode 1400 } 1394 1401 if (gContext->GetNumSetting("MacFloatEnabled", 0)) 1395 1402 { 1396 1403 float opacity = … … 1531 1538 if (Started) 1532 1539 { 1533 1540 Started = false; 1541 1542 //unhide main window 1543 //we don't care about this if we are in full screen mode 1544 if (data->windowedMode){ 1545 VERBOSE(VB_PLAYBACK, 1546 QString("Restoring Main Window to %1x%2") 1547 .arg(defaultWindowBounds.right - defaultWindowBounds.left).arg(defaultWindowBounds.bottom - defaultWindowBounds.top)); 1534 1548 1549 SetWindowBounds (data->window, kWindowStructureRgn, &defaultWindowBounds); 1550 } 1535 1551 data->views.clear(); 1536 1552 DeleteQuartzBuffers(); 1537 1553 } -
libs/libmythtv/videoout_quartz.h
4 4 struct QuartzData; 5 5 6 6 #include "videooutbase.h" 7 #import <Carbon/Carbon.h> 7 8 8 9 class VideoOutputQuartz : public VideoOutput 9 10 { … … 42 43 QuartzData * data; 43 44 44 45 VideoFrame pauseFrame; 46 47 Rect defaultWindowBounds; 45 48 }; 46 49 47 50 #endif