summaryrefslogtreecommitdiff
path: root/src/videowidget.cc
diff options
context:
space:
mode:
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"));