Skip to content

Commit

Permalink
Revert some changes in VideoDock
Browse files Browse the repository at this point in the history
  • Loading branch information
zaps166 committed Jun 5, 2015
1 parent c7fcf89 commit 9b7db11
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/gui/VideoDock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ void VideoDock::fullScreen( bool b )
}
else
{
/* Visualizations on full screen */
if ( widget() != &iDW )
{
if ( widget() )
{
widget()->unsetCursor();
widget()->setParent( NULL );
}
setWidget( &iDW );
}

setTitleBarVisible();
setFeatures( DockWidget::AllDockWidgetFeatures );
setFloating( is_floating );
Expand Down Expand Up @@ -117,12 +128,12 @@ void VideoDock::dropEvent( QDropEvent *e )
}
void VideoDock::mouseMoveEvent( QMouseEvent *e )
{
if ( iDW.widget() )
if ( internalWidget() )
{
#ifndef Q_OS_MAC
if ( ++pixels == 25 )
#endif
iDW.widget()->unsetCursor();
internalWidget()->unsetCursor();
hideCursorTim.start( 750 );
}
if ( e )
Expand Down Expand Up @@ -161,8 +172,8 @@ void VideoDock::wheelEvent( QWheelEvent *e )
void VideoDock::leaveEvent( QEvent *e )
{
hideCursorTim.stop();
if ( iDW.widget() )
iDW.widget()->unsetCursor();
if ( internalWidget() )
internalWidget()->unsetCursor();
#ifndef Q_OS_MAC
pixels = 0;
#endif
Expand Down Expand Up @@ -209,8 +220,8 @@ void VideoDock::popup( const QPoint &p )
void VideoDock::hideCursor()
{
hideCursorTim.stop();
if ( iDW.widget() )
iDW.widget()->setCursor( Qt::BlankCursor );
if ( internalWidget() )
internalWidget()->setCursor( Qt::BlankCursor );
#ifndef Q_OS_MAC
pixels = 0;
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/gui/VideoDock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ class VideoDock : public DockWidget
iDW.update();
}
private:
inline QWidget *internalWidget()
{
return ( widget() == &iDW ) ? iDW.widget() : widget();
}

void dragEnterEvent( QDragEnterEvent * );
void dropEvent( QDropEvent * );
void mouseMoveEvent( QMouseEvent * );
Expand Down

0 comments on commit 9b7db11

Please sign in to comment.