void ExternalDisplay::processUEventOnline(const char *str) { const char *s1 = str + (strlen(str)-strlen(DEVICE_NODE_FB1)); // check if it is for FB1 if(strncmp(s1,DEVICE_NODE_FB1, strlen(DEVICE_NODE_FB1))== 0) { if(isHDMIConfigured()) { // HDMI connect event. // Tear-down WFD if it is active. if(mExternalDisplay == EXTERN_DISPLAY_FB2) { closeFrameBuffer(); setExternalDisplay(EXTERN_DISPLAY_NONE); triggerRefresh(); } } readResolution(); //Get the best mode and set setResolution(getBestMode()); enableHDMIVsync(EXTERN_DISPLAY_FB1); setExternalDisplay(EXTERN_DISPLAY_FB1); triggerRefresh(); } else if(strncmp(s1, DEVICE_NODE_FB2, strlen(DEVICE_NODE_FB2)) == 0) { // WFD connect event if(mExternalDisplay == EXTERN_DISPLAY_FB1) { // HDMI has higher priority. // Do Not Override. }else { // WFD is connected openFrameBuffer(EXTERN_DISPLAY_FB2); setExternalDisplay(EXTERN_DISPLAY_FB2); triggerRefresh(); } } }
void ExternalDisplay::setEDIDMode(int resMode) { ALOGD_IF(DEBUG,"resMode=%d ", resMode); int extDispType; { Mutex::Autolock lock(mExtDispLock); extDispType = mExternalDisplay; setExternalDisplay(0); } triggerRefresh(); { Mutex::Autolock lock(mExtDispLock); setResolution(resMode); } setExternalDisplay(extDispType); triggerRefresh(); }
void KMJobViewer::slotShowCompleted(bool on) { removeFromManager(); m_type = (on ? KMJobManager::CompletedJobs : KMJobManager::ActiveJobs); addToManager(); triggerRefresh(); }
void KMJobViewer::pluginActionActivated(int ID) { KMTimer::self()->hold(); QPtrList<KMJob> joblist; jobSelection(joblist); if (!m_manager->doPluginAction(ID, joblist)) KMessageBox::error(this, "<qt>"+i18n("Operation failed.")+"<p>"+KMManager::self()->errorMsg()+"</p></qt>"); triggerRefresh(); KMTimer::self()->release(); }
void ExternalDisplay::processUEventOffline(const char *str) { const char *s1 = str + (strlen(str)-strlen(DEVICE_NODE_FB1)); // check if it is for FB1 if(strncmp(s1,DEVICE_NODE_FB1, strlen(DEVICE_NODE_FB1))== 0) { enableHDMIVsync(EXTERN_DISPLAY_NONE); closeFrameBuffer(); resetInfo(); setExternalDisplay(EXTERN_DISPLAY_NONE); } else if(strncmp(s1, DEVICE_NODE_FB2, strlen(DEVICE_NODE_FB2)) == 0) { closeFrameBuffer(); setExternalDisplay(EXTERN_DISPLAY_NONE); } triggerRefresh(); }
void KMJobViewer::setPrinter(const QString& prname) { // We need to trigger a refresh even if the printer // has not changed, some jobs may have been canceled // outside kdeprint. We can't return simply if // prname == m_prname. if (m_prname != prname) { removeFromManager(); m_prname = prname; addToManager(); m_view->setAcceptDrops( prname != i18n( "All Printers" ) ); } triggerRefresh(); }
void KMJobViewer::send(int cmd, const QString& name, const QString& arg) { KMTimer::self()->hold(); QPtrList<KMJob> l; jobSelection(l); if (!m_manager->sendCommand(l,cmd,arg)) { KMessageBox::error(this,"<qt>"+i18n("Unable to perform action \"%1\" on selected jobs. Error received from manager:").arg(name)+"<p>"+KMManager::self()->errorMsg()+"</p></qt>"); // error reported, clean it KMManager::self()->setErrorMsg(QString::null); } triggerRefresh(); KMTimer::self()->release(); }
void KMJobViewer::slotRefresh() { triggerRefresh(); }