From 379b2142186e8cf6f56e6b22c0ea44b4ea30fd6c Mon Sep 17 00:00:00 2001 From: Rik Hemsley Date: Mon, 21 Jan 2002 03:29:55 +0000 Subject: [PATCH] Fix problem where dragging a button makes the whole window drag. Had to create empty mouseMoveEvent() methods. svn path=/trunk/kdebase/kwin/; revision=132837 --- clients/riscos/Button.h | 1 + clients/riscos/Manager.cpp | 12 ++++++++++-- clients/web/WebButton.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/clients/riscos/Button.h b/clients/riscos/Button.h index b98adf50a7..8a6d60eae6 100644 --- a/clients/riscos/Button.h +++ b/clients/riscos/Button.h @@ -58,6 +58,7 @@ class Button : public KWinInternal::KWinWidgetButton void mousePressEvent(QMouseEvent *); void mouseReleaseEvent(QMouseEvent *); + void mouseMoveEvent(QMouseEvent *) { /* Empty. */ } void setPixmap(const QPixmap &); diff --git a/clients/riscos/Manager.cpp b/clients/riscos/Manager.cpp index 7e0dc53eb5..11442411ee 100644 --- a/clients/riscos/Manager.cpp +++ b/clients/riscos/Manager.cpp @@ -275,9 +275,9 @@ Manager::updateTitleBuffer() KWinInternal::Client::MousePosition Manager::mousePosition(const QPoint & p) const { - MousePosition m = Center; + MousePosition m = Nowhere; - // Off-by-one here ? + // Look out for off-by-one errors here. if (isResizable()) { @@ -292,6 +292,14 @@ Manager::mousePosition(const QPoint & p) const else m = Bottom; } + else + { + m = Client::mousePosition(p); + } + } + else + { + m = Client::mousePosition(p); } return m; diff --git a/clients/web/WebButton.h b/clients/web/WebButton.h index e1274dc50c..e8b95ade36 100644 --- a/clients/web/WebButton.h +++ b/clients/web/WebButton.h @@ -59,6 +59,7 @@ namespace KWinInternal void mousePressEvent(QMouseEvent *); void mouseReleaseEvent(QMouseEvent *); + void mouseMoveEvent(QMouseEvent *) { /* Empty */ } void enterEvent(QEvent *); void leaveEvent(QEvent *); void paintEvent(QPaintEvent *);