[vlc-commits] Revert "Qt: Add moving main window on any part of a window"
Rémi Denis-Courmont
git at videolan.org
Thu Feb 21 23:13:23 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Feb 22 00:11:25 2013 +0200| [8329973db6dbb4e54b7d7631de9ee8f928907bfb] | committer: Rémi Denis-Courmont
Revert "Qt: Add moving main window on any part of a window"
This reverts commit 6b2d303b9274d9e03bbb52a30a1e8572a6d581fb.
This fixes #8220.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8329973db6dbb4e54b7d7631de9ee8f928907bfb
---
modules/gui/qt4/main_interface.cpp | 35 -----------------------------------
modules/gui/qt4/main_interface.hpp | 9 ---------
2 files changed, 44 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 82008cb..2f2ca1a 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -327,11 +327,6 @@ void MainInterface::computeMinimumSize()
setMinimumWidth( minWidth );
}
-inline void MainInterface::moveWindow( int offsetX, int offsetY )
-{
- move( x() + offsetX, y() + offsetY );
-}
-
/*****************************
* Main UI handling *
*****************************/
@@ -1411,36 +1406,6 @@ bool MainInterface::eventFilter( QObject *obj, QEvent *event )
}
}
-void MainInterface::mousePressEvent( QMouseEvent *event )
-{
- b_customMoving = Qt::LeftButton == event->button();
- lastCustomMovePos = event->globalPos();
-}
-
-void MainInterface::mouseMoveEvent( QMouseEvent *event )
-{
- if( b_customMoving )
- {
- moveWindow(
- event->globalX() - lastCustomMovePos.x(),
- event->globalY() - lastCustomMovePos.y()
- );
- lastCustomMovePos = event->globalPos();
- }
-}
-
-void MainInterface::mouseReleaseEvent( QMouseEvent *event )
-{
- if( b_customMoving )
- {
- moveWindow(
- event->globalX() - lastCustomMovePos.x(),
- event->globalY() - lastCustomMovePos.y()
- );
- }
- b_customMoving = false;
-}
-
void MainInterface::toolBarConfUpdated()
{
QApplication::postEvent( this, new QEvent( MainInterface::ToolbarsNeedRebuild ) );
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 2cbf267..4c5b1fd 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -105,9 +105,6 @@ protected:
virtual void keyPressEvent( QKeyEvent *);
virtual void wheelEvent( QWheelEvent * );
virtual bool eventFilter(QObject *, QEvent *);
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
private:
/* Main Widgets Creation */
@@ -131,9 +128,6 @@ private:
void computeMinimumSize();
/* */
- inline void moveWindow( int offsetX, int offsetY );
-
- /* */
QSettings *settings;
QSystemTrayIcon *sysTray;
QMenu *systrayMenu;
@@ -161,8 +155,6 @@ private:
QMap<QWidget *, QSize> stackWidgetsSizes;
- QPoint lastCustomMovePos;
-
/* Flags */
unsigned i_notificationSetting; /// Systray Notifications
bool b_autoresize; ///< persistent resizable window
@@ -181,7 +173,6 @@ private:
bool b_hasPausedWhenMinimized;
bool b_statusbarVisible;
- bool b_customMoving; ///< Is the window moving by dragging ?
#ifdef WIN32
HIMAGELIST himl;
More information about the vlc-commits
mailing list