summaryrefslogtreecommitdiff
path: root/src/videowidget.cc
diff options
context:
space:
mode:
authordeva <deva>2005-07-27 12:40:47 +0000
committerdeva <deva>2005-07-27 12:40:47 +0000
commit6046ed450a83f509c4e5f2923ae4f8fcda9fd669 (patch)
treecee3b8aaed9e63d5458325cba118569d3f4c42f8 /src/videowidget.cc
parentaa76292f4ceb8bfa94066bd035dda81c95bc9052 (diff)
*** empty log message ***
Diffstat (limited to 'src/videowidget.cc')
-rw-r--r--src/videowidget.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/videowidget.cc b/src/videowidget.cc
index 8160833..04eb271 100644
--- a/src/videowidget.cc
+++ b/src/videowidget.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.9 2005/07/27 12:40:47 deva
+ * *** empty log message ***
+ *
* Revision 1.8 2005/07/26 16:16:56 deva
*
* Added fullscreen functionality.
@@ -82,17 +85,19 @@ QPixmap VideoWidget::getScreenshot()
return QPixmap::grabWindow (winId());
}
+static VideoWidget *fs = NULL;
+
void VideoWidget::mouseReleaseEvent(QMouseEvent *event)
{
- if(!parent) {
- // We are a fullscreen window
+ if(!parent) { // We are a fullscreen window
QString ids;
setenv("SDL_WINDOWID", ids.setNum(oldWindow->winId()), 1);
camera->resize(oldWindow->width(), oldWindow->height());
destroy();
- } else {
- // We are a nested window
- VideoWidget *fs = new VideoWidget(NULL, camera, this);
+ } else { // We are a nested window
+ // first delete old instance (if any)
+ if(fs) delete fs;
+ fs = new VideoWidget(NULL, camera, this);
fs->showFullScreen();
fs->setFixedWidth(config->readInt("pixel_width"));
fs->setFixedHeight(config->readInt("pixel_height"));