summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-31 23:24:57 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-31 23:24:57 +0300
commitadeb8e6091694e228f081ca8843e101ae598f26c (patch)
treea8a9caf4cbaf6b5d9a99f9b5e4e56f9b3203aa38 /src/gui/chatwindow.cpp
parent6d349121a70377723e53b92a8990e56ee3e4fd88 (diff)
downloadmanaplus-adeb8e6091694e228f081ca8843e101ae598f26c.tar.gz
manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.tar.bz2
manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.tar.xz
manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.zip
Add ability to lock any window position and size. Using sticky image for this.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 9c75320a6..784fb812a 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -167,6 +167,8 @@ ChatWindow::ChatWindow():
setResizable(true);
setDefaultVisible(true);
setSaveVisible(true);
+ setStickyButtonLock(true);
+
setDefaultSize(600, 123, ImageRect::LOWER_LEFT);
setMinWidth(150);
setMinHeight(90);
@@ -660,7 +662,7 @@ void ChatWindow::mouseDragged(gcn::MouseEvent &event)
if (event.isConsumed())
return;
- if (isMovable() && mMoved)
+ if (canMove() && isMovable() && mMoved)
{
int newX = std::max(0, getX() + event.getX() - mDragOffsetX);
int newY = std::max(0, getY() + event.getY() - mDragOffsetY);