From f0739dbe1f4f4018f728fcf546f9622b201786ba Mon Sep 17 00:00:00 2001 From: Rik Hemsley Date: Sun, 24 Sep 2000 10:28:06 +0000 Subject: [PATCH] Oh, forgot to check this stuff in. Fixes mouse position detection on bottom resize bar. svn path=/trunk/kdebase/kwin/; revision=64974 --- clients/kstep/nextclient.cpp | 21 +++++++++++++++++++++ clients/kstep/nextclient.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/clients/kstep/nextclient.cpp b/clients/kstep/nextclient.cpp index cf57cfd40b..b0fae0de51 100644 --- a/clients/kstep/nextclient.cpp +++ b/clients/kstep/nextclient.cpp @@ -347,4 +347,25 @@ void NextClient::activeChange(bool) button[2]->reset(); } + Client::MousePosition +NextClient::mousePosition( const QPoint& p ) const +{ + MousePosition m = Nowhere; + + if (p.y() < (height() - 6)) + m = Client::mousePosition(p); + + else { + if (p.x() >= (width() - 25)) + m = BottomRight; + else if (p.x() <= 25) + m = BottomLeft; + else + m = Bottom; + } + + return m; +} + + #include "nextclient.moc" diff --git a/clients/kstep/nextclient.h b/clients/kstep/nextclient.h index 13a5c95bea..5bc1972312 100644 --- a/clients/kstep/nextclient.h +++ b/clients/kstep/nextclient.h @@ -40,6 +40,9 @@ protected: void captionChange( const QString& name ); void stickyChange(bool on); void activeChange(bool); + + MousePosition mousePosition(const QPoint &) const; + protected slots: void slotReset(); private: