Ticket #8641: 8641-v4.patch
File 8641-v4.patch, 7.2 KB (added by , 14 years ago) |
---|
-
libs/libmythtv/tv_play.h
813 813 814 814 // Window info (GUI is optional, transcoding, preview img, etc) 815 815 TvPlayWindow *myWindow; ///< Our screen, if it exists 816 /// <player bounds, for after DoEditSchedule() returns to normal playing.816 /// player bounds, for after DoEditSchedule() returns to normal playing. 817 817 QRect player_bounds; 818 /// <Prior GUI window bounds, for DoEditSchedule() and player exit().818 /// Prior GUI window bounds, for DoEditSchedule() and player exit(). 819 819 QRect saved_gui_bounds; 820 820 /// true if this instance disabled MythUI drawing. 821 821 bool weDisabledGUI; -
libs/libmythtv/tv_play.cpp
1154 1154 } 1155 1155 1156 1156 MythMainWindow *mainWindow = GetMythMainWindow(); 1157 //QPalette p = mainWindow->palette();1158 //p.setColor(mainWindow->backgroundRole(), Qt::black);1159 //mainWindow->setPalette(p);1160 1157 mainWindow->installEventFilter(this); 1158 // get this screen to show on screen immediately.. 1161 1159 qApp->processEvents(); 1162 1160 } 1163 1161 1164 1162 { 1163 VERBOSE(VB_PLAYBACK, LOC + "Init -- waiting on InitFromDB"); 1165 1164 QMutexLocker locker(&initFromDBLock); 1166 1165 while (!initFromDBDone) 1167 1166 { … … 1170 1169 } 1171 1170 } 1172 1171 1172 VERBOSE(VB_PLAYBACK, LOC + "Init -- starting main loop"); 1173 1173 1174 mainLoopCondLock.lock(); 1174 1175 start(); 1175 1176 mainLoopCond.wait(&mainLoopCondLock); … … 1196 1197 gCoreContext->removeListener(this); 1197 1198 1198 1199 if (GetMythMainWindow() && weDisabledGUI) 1199 GetMythMainWindow()->PopDrawDisabled( );1200 GetMythMainWindow()->PopDrawDisabled(__FILE__, __LINE__); 1200 1201 1201 1202 if (myWindow) 1202 1203 { … … 1986 1987 if (GetMythMainWindow() && !weDisabledGUI) 1987 1988 { 1988 1989 weDisabledGUI = true; 1989 GetMythMainWindow()->PushDrawDisabled( );1990 GetMythMainWindow()->PushDrawDisabled(__FILE__, __LINE__); 1990 1991 DrawUnusedRects(); 1991 1992 } 1992 1993 … … 2059 2060 if (GetMythMainWindow() && !weDisabledGUI) 2060 2061 { 2061 2062 weDisabledGUI = true; 2062 GetMythMainWindow()->PushDrawDisabled( );2063 GetMythMainWindow()->PushDrawDisabled(__FILE__, __LINE__); 2063 2064 DrawUnusedRects(); 2064 2065 } 2065 2066 … … 7801 7802 // else has disabled painting show the MythUI window again. 7802 7803 if (GetMythMainWindow() && weDisabledGUI) 7803 7804 { 7804 GetMythMainWindow()->PopDrawDisabled( );7805 GetMythMainWindow()->PopDrawDisabled(__FILE__, __LINE__); 7805 7806 weDisabledGUI = false; 7806 7807 } 7808 7807 7809 GetMythMainWindow()->GetPaintWindow()->show(); 7808 7810 } 7809 7811 … … 8482 8484 if (message.left(11) == "EPG_EXITING" || 8483 8485 message.left(18) == "PROGFINDER_EXITING" || 8484 8486 message.left(21) == "VIEWSCHEDULED_EXITING" || 8485 message.left(19) 8487 message.left(19) == "PLAYBACKBOX_EXITING" || 8486 8488 message.left(22) == "SCHEDULEEDITOR_EXITING") 8487 8489 { 8488 8490 // Resize the window back to the MythTV Player size … … 8517 8519 if (!weDisabledGUI) 8518 8520 { 8519 8521 weDisabledGUI = true; 8520 GetMythMainWindow()->PushDrawDisabled( );8522 GetMythMainWindow()->PushDrawDisabled(__FILE__, __LINE__); 8521 8523 DrawUnusedRects(); 8522 8524 } 8523 8525 -
libs/libmythtv/videooutbase.cpp
1546 1546 1547 1547 void VideoOutput::ExposeEvent(void) 1548 1548 { 1549 VERBOSE(VB_IMPORTANT, "VideoOutput::ExposeEvent()"); 1549 1550 windows[0].SetNeedRepaint(true); 1550 1551 } 1551 1552 -
libs/libmythui/mythmainwindow.cpp
1176 1176 } 1177 1177 /* FIXME: end compatibility */ 1178 1178 1179 uint MythMainWindow::PushDrawDisabled( void)1179 uint MythMainWindow::PushDrawDisabled(const char *file, int line) 1180 1180 { 1181 1181 QMutexLocker locker(&d->m_drawDisableLock); 1182 VERBOSE(VB_IMPORTANT, QString("PushDrawDisabled(%1@%2) -- begin") 1183 .arg(file).arg(line)); 1182 1184 d->m_drawDisabledDepth++; 1183 1185 if (d->m_drawDisabledDepth && d->m_drawEnabled) 1184 1186 SetDrawEnabled(false); 1187 VERBOSE(VB_IMPORTANT, QString("PushDrawDisabled(%1@%2) -- end") 1188 .arg(file).arg(line)); 1185 1189 return d->m_drawDisabledDepth; 1186 1190 } 1187 1191 1188 uint MythMainWindow::PopDrawDisabled( void)1192 uint MythMainWindow::PopDrawDisabled(const char *file, int line) 1189 1193 { 1190 1194 QMutexLocker locker(&d->m_drawDisableLock); 1195 VERBOSE(VB_IMPORTANT, QString("PopDrawDisabled(%1@%2) -- begin") 1196 .arg(file).arg(line)); 1191 1197 if (d->m_drawDisabledDepth) 1192 1198 { 1193 1199 d->m_drawDisabledDepth--; 1194 1200 if (!d->m_drawDisabledDepth && !d->m_drawEnabled) 1195 1201 SetDrawEnabled(true); 1196 1202 } 1203 VERBOSE(VB_IMPORTANT, QString("PopDrawDisabled(%1@%2) -- end") 1204 .arg(file).arg(line)); 1197 1205 return d->m_drawDisabledDepth; 1198 1206 } 1199 1207 … … 1203 1211 1204 1212 if (!gCoreContext->IsUIThread()) 1205 1213 { 1214 VERBOSE(VB_IMPORTANT, LOC + QString("SetDrawEnabled(%1) -- outside UI") 1215 .arg(enable)); 1216 1206 1217 QCoreApplication::postEvent( 1207 1218 this, new MythEvent( 1208 1219 (enable) ? 1209 1220 MythEvent::kEnableDrawingEventType : 1210 1221 MythEvent::kDisableDrawingEventType)); 1211 1222 1223 VERBOSE(VB_IMPORTANT, LOC + QString("SetDrawEnabled(%1) -- waiting") 1224 .arg(enable)); 1225 1212 1226 while (QCoreApplication::hasPendingEvents()) 1213 1227 d->m_setDrawEnabledWait.wait(&d->m_setDrawEnabledLock); 1214 1228 1229 VERBOSE(VB_IMPORTANT, LOC + QString("SetDrawEnabled(%1) -- done") 1230 .arg(enable)); 1231 1215 1232 return; 1216 1233 } 1217 1234 1235 static uint ecnt = 0, dcnt = 0; 1236 ecnt += enable ? 1 : 0; 1237 dcnt += enable ? 0 : 1; 1238 1239 VERBOSE(VB_IMPORTANT, LOC + QString("SetDrawEnabled(%1) cnt %2") 1240 .arg(enable).arg(enable?ecnt:dcnt)); 1241 1218 1242 setUpdatesEnabled(enable); 1219 1243 d->m_drawEnabled = enable; 1220 1244 … … 2029 2053 } 2030 2054 else if (ce->type() == MythEvent::kPushDisableDrawingEventType) 2031 2055 { 2032 PushDrawDisabled( );2056 PushDrawDisabled(__FILE__, __LINE__); 2033 2057 } 2034 2058 else if (ce->type() == MythEvent::kPopDisableDrawingEventType) 2035 2059 { 2036 PopDrawDisabled( );2060 PopDrawDisabled(__FILE__, __LINE__); 2037 2061 } 2038 2062 else if (ce->type() == MythEvent::kDisableDrawingEventType) 2039 2063 { -
libs/libmythui/mythmainwindow.h
113 113 114 114 QWidget *currentWidget(void); 115 115 116 uint PushDrawDisabled( void);117 uint PopDrawDisabled( void);116 uint PushDrawDisabled(const char *file, int line); 117 uint PopDrawDisabled(const char *file, int line); 118 118 void SetEffectsEnabled(bool enable); 119 119 120 120 public slots: