Fix bug: avoid clicking window borders when a combobox is open

This commit is contained in:
David Capello 2014-08-11 08:10:42 -03:00
parent c936a792ab
commit 1f25579f5a

View File

@ -1,5 +1,5 @@
// Aseprite UI Library
// Copyright (C) 2001-2013 David Capello
// Copyright (C) 2001-2014 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@ -108,7 +108,12 @@ void Window::onHitTest(HitTestEvent& ev)
{
HitTest ht = HitTestNowhere;
if (!m_isMoveable) {
// If this window is not movable or we are not completely visible.
if (!m_isMoveable ||
// TODO check why this is necessary, there should be a bug in
// the manager where we are receiving mouse events and are not
// the top most window.
getManager()->pick(ev.getPoint()) != this) {
ev.setHit(ht);
return;
}