mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Send mouse events when a new window is displayed (fix #1221)
In this way if a new widget is displayed it will get the mouse-enter and set-cursor messages correctly.
This commit is contained in:
parent
88455ebc4b
commit
2216db2d2c
@ -986,7 +986,7 @@ void Manager::dirtyRect(const gfx::Rect& bounds)
|
||||
m_dirtyRegion.createUnion(m_dirtyRegion, gfx::Region(bounds));
|
||||
}
|
||||
|
||||
/* configures the window for begin the loop */
|
||||
// Configures the window for begin the loop
|
||||
void Manager::_openWindow(Window* window)
|
||||
{
|
||||
// Free all widgets of special states.
|
||||
@ -1006,6 +1006,12 @@ void Manager::_openWindow(Window* window)
|
||||
|
||||
// Update the new windows list to show.
|
||||
new_windows.push_back(window);
|
||||
|
||||
// Update mouse widget (as it can be a widget below the
|
||||
// recently opened window).
|
||||
Widget* widget = pick(ui::get_mouse_position());
|
||||
if (widget)
|
||||
setMouse(widget);
|
||||
}
|
||||
|
||||
void Manager::_closeWindow(Window* window, bool redraw_background)
|
||||
|
Loading…
x
Reference in New Issue
Block a user