Ticket #6790: tvwin_fixes.diff
File tvwin_fixes.diff, 5.8 KB (added by , 15 years ago) |
---|
-
mythtv/libs/libmythtv/tv_play.cpp
897 897 // player window sizing 898 898 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 899 899 900 myWindow = new TvPlayWindow(mainStack , "Playback");900 myWindow = new TvPlayWindow(mainStack); 901 901 902 902 if (myWindow->Create()) 903 903 mainStack->AddScreen(myWindow, false); … … 908 908 } 909 909 910 910 MythMainWindow *mainWindow = GetMythMainWindow(); 911 //QPalette p = mainWindow->palette();912 //p.setColor(mainWindow->backgroundRole(), Qt::black);913 //mainWindow->setPalette(p);914 911 mainWindow->installEventFilter(this); 915 912 qApp->processEvents(); 916 913 } … … 987 984 } 988 985 ReturnPlayerLock(mctx); 989 986 990 GetMythMainWindow()->GetPaintWindow()->show();987 //GetMythMainWindow()->SetDrawEnabled(true); 991 988 992 989 VERBOSE(VB_PLAYBACK, "TV::~TV() -- end"); 993 990 } … … 2002 1999 (db_use_fixed_size) ? player_bounds.size() : 2003 2000 QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); 2004 2001 mainWindow->setGeometry(player_bounds); 2005 2006 // hide the GUI paint window2007 GetMythMainWindow()->GetPaintWindow()->hide();2008 2002 } 2009 2003 2010 2004 VERBOSE(VB_PLAYBACK, LOC + … … 4871 4865 if (StateIsLiveTV(mctx->GetState())) 4872 4866 mctx->buffer->Unpause(); 4873 4867 4874 bool ok = mctx->CreateNVP( 4875 this, gContext->GetMainWindow(), mctx->GetState(), 0, &mctx->embedBounds); 4868 QWidget *widget = gContext->GetMainWindow()->GetPaintWindow(); 4876 4869 4870 bool ok = mctx->CreateNVP(this, widget, mctx->GetState(), 0, 4871 &mctx->embedBounds); 4872 4877 4873 if (ok) 4878 4874 { 4879 4875 ScheduleStateChange(mctx); … … 4995 4991 } 4996 4992 else 4997 4993 { 4998 ok = ctx->CreateNVP(this, gContext->GetMainWindow(), desiredState, 4994 QWidget *widget = gContext->GetMainWindow()->GetPaintWindow(); 4995 4996 ok = ctx->CreateNVP(this, widget, desiredState, 4999 4997 mctx->embedWinID, &mctx->embedBounds); 5000 4998 ScheduleStateChange(ctx); 5001 4999 } … … 5382 5380 mctx->SetPIPState(kPIPOff); 5383 5381 mctx->buffer->Seek(0, SEEK_SET); 5384 5382 5385 if (mctx->CreateNVP(this, gContext->GetMainWindow(), mctx->GetState(), 5383 QWidget *widget = gContext->GetMainWindow()->GetPaintWindow(); 5384 5385 if (mctx->CreateNVP(this, widget, mctx->GetState(), 5386 5386 mctx->embedWinID, &mctx->embedBounds)) 5387 5387 { 5388 5388 ScheduleStateChange(mctx); … … 7923 7923 } 7924 7924 else 7925 7925 { 7926 //we are embedding in a mythui window so show the gui paint window again7927 GetMythMainWindow()->GetPaintWindow()->show();7926 //we are embedding in a mythui window so re-enable drawing 7927 //GetMythMainWindow()->SetDrawEnabled(true); 7928 7928 } 7929 7929 } 7930 7930 … … 7935 7935 // this will create the program guide window (widget) 7936 7936 // on the main thread and avoid a deadlock on Win32 7937 7937 QString message = QString("START_EPG %1").arg(editType); 7938 //GetMythMainWindow()->SetDrawEnabled(true); 7938 7939 MythEvent* me = new MythEvent(message); 7939 7940 qApp->postEvent(gContext->GetMainWindow(), me); 7940 7941 } … … 8614 8615 PlayerContext *mctx; 8615 8616 MythMainWindow *mwnd = gContext->GetMainWindow(); 8616 8617 8618 GetMythMainWindow()->GetPaintWindow()->clearMask(); 8619 //GetMythMainWindow()->SetDrawEnabled(false); 8620 8617 8621 StopEmbedding(actx); // Undo any embedding 8618 8622 SetPlayerVisibility(actx, kVisibility_Normal); 8619 8623 8620 8624 mctx = GetPlayerReadLock(0, __FILE__, __LINE__); 8621 8625 mctx->LockDeleteNVP(__FILE__, __LINE__); 8622 8626 if (mctx->nvp && mctx->nvp->getVideoOutput()) … … 8634 8638 8635 8639 DoSetPauseState(actx, saved_pause); // Restore pause states 8636 8640 8637 GetMythMainWindow()->GetPaintWindow()->hide();8638 GetMythMainWindow()->GetPaintWindow()->clearMask();8639 8640 8641 qApp->processEvents(); 8641 8642 DrawUnusedRects(true, actx); 8642 8643 -
mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
720 720 { 721 721 MythMainWindow *window = gContext->GetMainWindow(); 722 722 723 QWidget *widget = 724 window->findChild<QWidget*>("video playback window"); 723 QWidget *widget = window->GetPaintWindow(); 725 724 726 725 if (!widget) 727 726 { … … 738 737 return false; 739 738 } 740 739 740 // Suspend GUI painting 741 //GetMythMainWindow()->SetDrawEnabled(false); 742 741 743 QRect display_rect; 742 744 int pbp_width = widget->width() / 2; 743 745 if (pipState == kPIPStandAlone) -
mythtv/libs/libmythtv/tv_play_win.cpp
9 9 #include "tv_play_win.h" 10 10 11 11 12 TvPlayWindow::TvPlayWindow(MythScreenStack *parent , const char *name)13 : MythScreenType(parent, name)12 TvPlayWindow::TvPlayWindow(MythScreenStack *parent) 13 : MythScreenType(parent, "video playback window") 14 14 { 15 15 SetCanTakeFocus(true); 16 16 } -
mythtv/libs/libmythtv/tv_play_win.h
12 12 Q_OBJECT 13 13 14 14 public: 15 TvPlayWindow(MythScreenStack *parent , const char *name);15 TvPlayWindow(MythScreenStack *parent); 16 16 ~TvPlayWindow(); 17 17 18 18 virtual void gestureEvent(MythUIType *, MythGestureEvent *);