summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp45
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h11
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp3
3 files changed, 19 insertions, 40 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index 5b00dea..03f3c1c 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -16,6 +16,6 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name
16 m_viewManager = 0; 16 m_viewManager = 0;
17 m_focus_out = false; 17 focus_in_count = 0;
18 block_next_focus = true;
19 m_cfg = cfg; 18 m_cfg = cfg;
20 m_isFullScreen = false; 19 m_isFullScreen = false;
20 m_ignore_next_in = false;
21 QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold); 21 QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold);
@@ -109,3 +109,2 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
109 } 109 }
110// if (!fullScreen()) return;
111 odebug << "Popup " << oendl; 110 odebug << "Popup " << oendl;
@@ -127,6 +126,2 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
127 delete m; 126 delete m;
128 /* if we were fullScreen() and must overlap the taskbar again */
129 if (fullScreen() && old) {
130 enableFullscreen();
131 }
132} 127}
@@ -141,8 +136,6 @@ void ImageView::focusInEvent(QFocusEvent *)
141 // Always do it here, no matter the size. 136 // Always do it here, no matter the size.
142 odebug << "Focus in" << oendl; 137 odebug << "Focus in (view)" << oendl;
143} 138 //if (fullScreen()) parentWidget()->showNormal();
144 139 if (m_ignore_next_in){m_ignore_next_in=false;return;}
145void ImageView::focusOutEvent(QFocusEvent *) 140 if (fullScreen()) enableFullscreen();
146{
147 odebug << "Focus out" << oendl;
148} 141}
@@ -153,15 +146,15 @@ void ImageView::enableFullscreen()
153 // correctly if the widget already considers itself to be fullscreen. 146 // correctly if the widget already considers itself to be fullscreen.
147 if (!fullScreen()) return;
148 if (m_ignore_next_in) {m_ignore_next_in = false;return;}
149
154 setUpdatesEnabled(false); 150 setUpdatesEnabled(false);
155 odebug << "showNormal();" << oendl;
156 parentWidget()->showNormal(); 151 parentWidget()->showNormal();
157 odebug << "showNormal(); done " << oendl;
158 // This is needed because showNormal() forcefully changes the window 152 // This is needed because showNormal() forcefully changes the window
159 // style to WSTyle_TopLevel. 153 // style to WSTyle_TopLevel.
160 odebug << " reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));" << oendl;
161 parentWidget()->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); 154 parentWidget()->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));
162 odebug << " reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); done" << oendl;
163 // Enable fullscreen. 155 // Enable fullscreen.
164 odebug << "showFullScreen();" << oendl; 156 /* this is the trick - I don't now why, but after a showFullScreen QTE toggles the focus
157 * so we must block it here! */
158 m_ignore_next_in = true;
165 parentWidget()->showFullScreen(); 159 parentWidget()->showFullScreen();
166 odebug << "showFullScreen(); done" << oendl;
167 setUpdatesEnabled(true); 160 setUpdatesEnabled(true);
@@ -169,12 +162,2 @@ void ImageView::enableFullscreen()
169 162
170void ImageWidget::show()
171{
172 QWidget::show();
173}
174
175void ImageWidget::hide()
176{
177 QWidget::hide();
178}
179
180ImageWidget::ImageWidget(QWidget * parent, const char * name, WFlags f) 163ImageWidget::ImageWidget(QWidget * parent, const char * name, WFlags f)
@@ -182,4 +165,4 @@ ImageWidget::ImageWidget(QWidget * parent, const char * name, WFlags f)
182{ 165{
183 // Make sure size is correct 166 // Make sure size is correct
184 setFixedSize(qApp->desktop()->size()); 167 setFixedSize(qApp->desktop()->size());
185} 168}
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index 5f15bc9..f3c37b5 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -33,4 +33,4 @@ public:
33 void setFullScreen(bool how); 33 void setFullScreen(bool how);
34 virtual void enableFullscreen();
35 bool fullScreen(){return m_isFullScreen;} 34 bool fullScreen(){return m_isFullScreen;}
35 virtual void enableFullscreen();
36 36
@@ -51,7 +51,6 @@ protected:
51 bool m_isFullScreen:1; 51 bool m_isFullScreen:1;
52 bool m_focus_out:1; 52 bool m_ignore_next_in:1;
53 bool block_next_focus:1; 53 int focus_in_count;
54
55 virtual void focusInEvent ( QFocusEvent * ); 54 virtual void focusInEvent ( QFocusEvent * );
56 virtual void focusOutEvent ( QFocusEvent * ); 55
57 56
@@ -73,4 +72,2 @@ protected:
73public slots: 72public slots:
74 virtual void show();
75 virtual void hide();
76 73
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index fa1680c..cdaf34c 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -400,4 +400,3 @@ void PMainWindow::slotDisplay( const QString& inf ) {
400 if (m_disp->fullScreen()) { 400 if (m_disp->fullScreen()) {
401// tFrame->showFullScreen(); 401 tFrame->show();//FullScreen();
402 m_disp->enableFullscreen();
403 } else { 402 } else {