Commit ee95f804 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Qt: no popup menu over the status bar and menu bar

parent 0f749c63
...@@ -246,7 +246,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -246,7 +246,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Enable the popup menu in the MI */ /* Enable the popup menu in the MI */
setContextMenuPolicy( Qt::CustomContextMenu ); setContextMenuPolicy( Qt::CustomContextMenu );
CONNECT( this, customContextMenuRequested( const QPoint& ), CONNECT( this, customContextMenuRequested( const QPoint& ),
this, popupMenu() ); this, popupMenu( const QPoint& ) );
/* Final sizing and showing */ /* Final sizing and showing */
setMinimumWidth( __MAX( controls->sizeHint().width(), setMinimumWidth( __MAX( controls->sizeHint().width(),
...@@ -633,9 +633,13 @@ void MainInterface::toggleFSC() ...@@ -633,9 +633,13 @@ void MainInterface::toggleFSC()
QApplication::postEvent( fullscreenControls, eShow ); QApplication::postEvent( fullscreenControls, eShow );
} }
void MainInterface::popupMenu() void MainInterface::popupMenu( const QPoint &p )
{ {
QVLCMenu::PopupMenu( p_intf, true ); /* Ow, that's ugly: don't show the popup menu if cursor over
* the main menu bar or the status bar */
if( !childAt( p ) || ( ( childAt( p ) != menuBar() )
&& ( childAt( p )->parentWidget() != statusBar() ) ) )
QVLCMenu::PopupMenu( p_intf, true );
} }
void MainInterface::debug() void MainInterface::debug()
......
...@@ -158,7 +158,7 @@ public slots: ...@@ -158,7 +158,7 @@ public slots:
void toggleAdvanced(); void toggleAdvanced();
void toggleFullScreen(); void toggleFullScreen();
void toggleFSC(); void toggleFSC();
void popupMenu(); void popupMenu( const QPoint& );
/* Manage the Video Functions from the vout threads */ /* Manage the Video Functions from the vout threads */
void releaseVideoSlot( void ); void releaseVideoSlot( void );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment