From eaeb27fd138a9fa8912f83310ae52086761e91ff Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Sun, 19 Oct 2003 09:16:11 +0000 Subject: [PATCH] Enabled titlebar dragging by shift-clicking it. Still missing is the automatic titlebar unhiding. svn path=/trunk/kdebase/kwin/; revision=260075 --- clients/b2/b2client.cpp | 8 +++----- clients/b2/b2client.h | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index 071eaf3ee6..f2902f6035 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -1211,7 +1211,6 @@ void B2Titlebar::mouseDoubleClickEvent( QMouseEvent * ) client->titlebarDblClickOperation(); } -#if 0 void B2Titlebar::mousePressEvent( QMouseEvent * e ) { shift_move = e->state() & ShiftButton; @@ -1219,7 +1218,6 @@ void B2Titlebar::mousePressEvent( QMouseEvent * e ) moveOffset = e->globalPos(); } else { client->processMousePressEvent(e); - // client->performWindowOperation(KDecoration::MoveOp); } } @@ -1237,12 +1235,12 @@ void B2Titlebar::mouseMoveEvent( QMouseEvent * e ) if (oldx >= 0 && oldx <= rect().right()) { client->titleMoveRel(xdiff); } + } else { + e->ignore(); } } -#endif - -} +} // namespace B2 #include "b2client.moc" diff --git a/clients/b2/b2client.h b/clients/b2/b2client.h index adddf9d576..28cdd60cb2 100644 --- a/clients/b2/b2client.h +++ b/clients/b2/b2client.h @@ -68,11 +68,9 @@ protected: void paintEvent( QPaintEvent* ); bool x11Event(XEvent *e); void mouseDoubleClickEvent( QMouseEvent * ); -#if 0 void mousePressEvent( QMouseEvent * ); void mouseReleaseEvent( QMouseEvent * ); void mouseMoveEvent(QMouseEvent *); -#endif void resizeEvent(QResizeEvent *ev); private: void drawTitlebar(QPainter &p, bool state);