]> git.sur5r.net Git - minitube/commitdiff
Merge branch 'dualscreen_fix' of gitorious.org:~stiat/minitube/stiats-minitube into...
authorGeorg Grabler <georg@grabler.net>
Sat, 5 Feb 2011 16:58:42 +0000 (16:58 +0000)
committerGeorg Grabler <georg@grabler.net>
Sat, 5 Feb 2011 16:58:42 +0000 (16:58 +0000)
* re-initialized local branch and went for another solution

Conflicts:
src/MainWindow.cpp
src/videoareawidget.cpp

1  2 
src/MainWindow.cpp

index 95f715d33a50e5b6541eb31a4ca68206a28a309a,93c55b88e6de42b1aeaa2b13e35007267871f2bb..c390bdc7cf30ad9c50f6980fa078ae17b383d8c6
@@@ -89,16 -91,35 +91,17 @@@ MainWindow::~MainWindow() 
  }
  
  bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
 -    if (this->mediaView->isVisible()) {
 -        if (event->type() == QEvent::MouseMove) {
 -            QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
 -
 -            const int x = mouseEvent->pos().x();
 -            const int y = mouseEvent->pos().y();
 -
 -            if (x >= 0 && x <= 10 && this->m_fullscreen) {
 -                this->mediaView->setPlaylistVisible(true);
 -            } else if ((x > this->mediaView->getPlaylistSize().width() || x < 0) && this->m_fullscreen) {
 -                this->mediaView->setPlaylistVisible(false);
 -            } else if (!this->m_fullscreen){
 -                this->mediaView->setPlaylistVisible(true);
 -            }
 -
 -            if (y >= 0 && y <= 10 && this->m_fullscreen) {
 -                this->mainToolBar->setVisible(true);
 -            } else if ((y > this->mainToolBar->size().height() || y < 0) && this->m_fullscreen) {
 -                this->mainToolBar->setVisible(false);
 -            } else if (!this->m_fullscreen) {
 -                this->mainToolBar->setVisible(true);
 -            }
 -        }
 -        if (event->type() == QEvent::FocusOut && this->m_fullscreen) {
 +    if (event->type() == QEvent::MouseMove && this->m_fullscreen) {
 +        QMouseEvent *mouseEvent = static_cast<QMouseEvent*> (event);
 +        int x = mouseEvent->pos().x();
 +        int y = mouseEvent->pos().y();
 +
 +        if (y < 0 && (obj == this->mainToolBar || !(y <= 10-this->mainToolBar->height() && y >= 0-this->mainToolBar->height() )))
 +           this->mainToolBar->setVisible(false);
 +        if (x < 0)
              this->mediaView->setPlaylistVisible(false);
 -            this->mainToolBar->setVisible(false);
 -        }
      }
      if (event->type() == QEvent::ToolTip) {
          // kill tooltips
          return true;