screen: Update the clients screen from fake_resize and fake_add.

Otherwise the client were still in the old tasklist when `:split()` is
called.
This commit is contained in:
Emmanuel Lepage Vallee 2019-06-25 00:31:37 -04:00
parent 994034934e
commit d4ce5706c7
1 changed files with 10 additions and 0 deletions

View File

@ -1644,6 +1644,11 @@ luaA_screen_fake_add(lua_State *L)
luaA_class_emit_signal(L, &screen_class, "list", 0); luaA_class_emit_signal(L, &screen_class, "list", 0);
luaA_object_push(L, s); luaA_object_push(L, s);
foreach(c, globalconf.clients) {
screen_client_moveto(*c, screen_getbycoord(
(*c)->geometry.x, (*c)->geometry.y), false);
}
return 1; return 1;
} }
@ -1702,6 +1707,11 @@ luaA_screen_fake_resize(lua_State *L)
luaA_pusharea(L, old_geometry); luaA_pusharea(L, old_geometry);
luaA_object_emit_signal(L, 1, "property::geometry", 1); luaA_object_emit_signal(L, 1, "property::geometry", 1);
/* Note: calling `screen_client_moveto` from here will create more issues
* than it would fix. Keep in mind that it means `c.screen` will be wrong
* until Lua it `fake_add` fixes it.
*/
return 0; return 0;
} }