summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp18
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h1
2 files changed, 17 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 67eb277..f443ccb 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -74,4 +74,5 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true));
m_aAutoRotate->setEnabled(!m_aUnscaled->isOn());
+ odebug << "mainwindow constructor done" << oendl;
}
@@ -434,11 +435,24 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
}
-void PMainWindow::setDocument( const QString& showImg ) {
+void PMainWindow::setDocument( const QString& showImg )
+{
+ bool first_start = m_disp==0;
+
QString file = showImg;
DocLnk lnk(showImg);
if (lnk.isValid() )
file = lnk.file();
-
slotDisplay( file );
+ if (first_start && m_aFullScreen->isOn()) {
+ QTimer::singleShot(0,this,SLOT(check_view_fullscreen()));
+ }
+}
+
+void PMainWindow::check_view_fullscreen()
+{
+ if (!m_view) return;
+ if (!m_view->hasFocus()&&m_aFullScreen->isOn()) {
+ qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
+ }
}
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index 5707568..465e352 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -66,4 +66,5 @@ protected slots:
void listviewselected(QAction*);
void slotFullScreenButton(bool);
+ void check_view_fullscreen();
private: