mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-24 08:18:16 +00:00
Change window visibility only when owns display
Before this the visibility was changed if the window pointed to a display without taking into account that it might not own it. Fix #4805
This commit is contained in:
parent
7038ab501e
commit
45c2a59504
@ -717,8 +717,11 @@ void Window::onSetText()
|
||||
void Window::onVisible(bool visible)
|
||||
{
|
||||
Widget::onVisible(visible);
|
||||
if (get_multiple_displays() && m_display) {
|
||||
display()->nativeWindow()->setVisible(visible);
|
||||
Display* display = this->display();
|
||||
if (ownDisplay() &&
|
||||
display &&
|
||||
display->nativeWindow()) {
|
||||
display->nativeWindow()->setVisible(visible);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user