summaryrefslogtreecommitdiff
authoralwin <alwin>2004-11-07 14:14:02 (UTC)
committer alwin <alwin>2004-11-07 14:14:02 (UTC)
commite11d189bfd48ab072da4753240a4ab0bbf81296f (patch) (side-by-side diff)
tree0117c440ff2d95b2d967df8b1c9ccea00e818a65
parentebed03682190e26f1ff7d8fc90e34324114b9c40 (diff)
downloadopie-e11d189bfd48ab072da4753240a4ab0bbf81296f.zip
opie-e11d189bfd48ab072da4753240a4ab0bbf81296f.tar.gz
opie-e11d189bfd48ab072da4753240a4ab0bbf81296f.tar.bz2
when last view state was fullscreen and user tabbed on an image the
imagedisplay was behind the application gui 'cause gui was painted after the imagewindow. So now opie-eye starts a short timer in setDocument when first start checking the visibility of imagewindow.
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
@@ -70,12 +70,13 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
/* setup menu and toolbar */
setupActions();
setupToolbar();
setupMenu();
m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true));
m_aAutoRotate->setEnabled(!m_aUnscaled->isOn());
+ odebug << "mainwindow constructor done" << oendl;
}
PMainWindow::~PMainWindow() {
}
void PMainWindow::slotToggleZoomer()
@@ -430,19 +431,32 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
m_stack->addWidget(m_disp,ImageDisplay);
}
ev->accept();
QTimer::singleShot(0, qApp, SLOT(closeAllWindows()));
}
-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);
+ }
}
void PMainWindow::slotSelectDir(int id)
{
emit changeDir( m_dev[fsMenu->text(id )] );
}
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
@@ -62,12 +62,13 @@ public slots:
protected slots:
void raiseIconView();
void closeEvent( QCloseEvent* );
void showToolbar(bool);
void listviewselected(QAction*);
void slotFullScreenButton(bool);
+ void check_view_fullscreen();
private:
template<class T> void initT( const char* name, T**, int );
void initInfo();
void initDisp();
void setupViewWindow(bool full, bool forceDisplay);