Hot region is specified in screen coordinates for PopupWindows

This commit is contained in:
David Capello 2021-05-15 14:37:11 -03:00
parent 54c286407b
commit dd9ef64668

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2018-2020 Igara Studio S.A.
// Copyright (C) 2018-2021 Igara Studio S.A.
// Copyright (C) 2001-2018 David Capello
//
// This program is distributed under the terms of
@ -425,7 +425,7 @@ void ToolBar::openPopupWindow(int group_index, ToolGroup* tool_group)
// Set hotregion of popup window
Region rgn(gfx::Rect(rc).enlarge(16*guiscale()));
rgn.createUnion(rgn, Region(bounds()));
rgn.createUnion(rgn, Region(boundsOnScreen()));
m_popupWindow->setHotRegion(rgn);
m_popupWindow->setAutoRemap(false);
m_popupWindow->setBounds(rc);