Bring secondary window to front if it's on the same monitor as the primary window, #3957

This commit is contained in:
heckflosse
2017-07-16 19:29:59 +02:00
parent 164c577b24
commit 31fffbdb6d

View File

@@ -237,10 +237,10 @@ bool EditWindow::selectEditorPanel(const std::string &name)
void EditWindow::toFront ()
{
// when using MEOW mode on a single monitor we need to present the secondary window.
// If we don't it will stay in background when opening 2nd, 3rd... editor, which is annoying
// when using the secondary window on the same monitor as the primary window we need to present the secondary window.
// If we don't, it will stay in background when opening 2nd, 3rd... editor, which is annoying
// It will also deiconify the window
if(!isMultiDisplayEnabled()) {
if(parent->get_screen()->get_monitor_at_window(parent->get_window()) == parent->get_screen()->get_monitor_at_window(this->get_window())) {
present();
}
}