Bugfix: fix focus handling in 'floating disable' on non-visible windows (Thanks necoro)

fixes #1027
This commit is contained in:
Michael Stapelberg
2013-06-29 20:27:33 +02:00
parent d7222c0073
commit b4f7142509
2 changed files with 73 additions and 2 deletions

View File

@ -315,6 +315,8 @@ void floating_disable(Con *con, bool automatic) {
return;
}
const bool set_focus = (con == focused);
Con *ws = con_get_workspace(con);
/* 1: detach from parent container */
@ -344,8 +346,9 @@ void floating_disable(Con *con, bool automatic) {
con_attach(con, con->parent, false);
con_fix_percent(con->parent);
// TODO: dont influence focus handling when Con was not focused before.
con_focus(con);
if (set_focus)
con_focus(con);
}
/*