diff options
author | Paul Gilbert | 2018-11-07 21:04:12 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | 88315e7349a011d8168dc3e4c562f40e6e51c1c1 (patch) | |
tree | 6ce009c789abef8e7cbfe9c7ba950b6a687b1ea7 | |
parent | 8e1be3a95c7395c83271e54f505ca10cc4c4c531 (diff) | |
download | scummvm-rg350-88315e7349a011d8168dc3e4c562f40e6e51c1c1.tar.gz scummvm-rg350-88315e7349a011d8168dc3e4c562f40e6e51c1c1.tar.bz2 scummvm-rg350-88315e7349a011d8168dc3e4c562f40e6e51c1c1.zip |
GLK: Fix selection area getting removed when mouse button was released
-rw-r--r-- | engines/gargoyle/events.cpp | 1 | ||||
-rw-r--r-- | engines/gargoyle/window_mask.h | 3 | ||||
-rw-r--r-- | engines/gargoyle/window_text_buffer.cpp | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/engines/gargoyle/events.cpp b/engines/gargoyle/events.cpp index 7d6bf39066..4618df4107 100644 --- a/engines/gargoyle/events.cpp +++ b/engines/gargoyle/events.cpp @@ -191,6 +191,7 @@ void Events::pollEvents() { case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONUP: handleButtonUp(event.type == Common::EVENT_LBUTTONUP, event.mouse); + return; case Common::EVENT_WHEELUP: case Common::EVENT_WHEELDOWN: diff --git a/engines/gargoyle/window_mask.h b/engines/gargoyle/window_mask.h index 67d68dc79e..502ed49c07 100644 --- a/engines/gargoyle/window_mask.h +++ b/engines/gargoyle/window_mask.h @@ -64,6 +64,9 @@ public: */ void moveSelection(const Point &pos); + /** + * Remove any previously selected area + */ void clearSelection(); /** diff --git a/engines/gargoyle/window_text_buffer.cpp b/engines/gargoyle/window_text_buffer.cpp index a8ac85e1df..c6dde5bdb4 100644 --- a/engines/gargoyle/window_text_buffer.cpp +++ b/engines/gargoyle/window_text_buffer.cpp @@ -365,9 +365,9 @@ void TextBufferWindow::putTextUni(const glui32 *buf, int len, int pos, int oldle void TextBufferWindow::touch(int line) { _lines[line]._dirty = true; g_vm->_windowMask->clearSelection(); - //int y = _bbox.top + g_conf->_tMarginY + (_height - line - 1) * g_conf->_leading; - //_windows->repaint(Rect(_bbox.left, y - 2, _bbox.right, y + g_conf->_leading + 2)); - redraw(); + + int y = _bbox.top + g_conf->_tMarginY + (_height - line - 1) * g_conf->_leading; + _windows->repaint(Rect(_bbox.left, y - 2, _bbox.right, y + g_conf->_leading + 2)); } glui32 TextBufferWindow::getSplit(glui32 size, bool vertical) const { |