Fix: render_con shows floating containers on wrong workspace

After 204eefc. Alternative fix:
    diff --git a/src/floating.c b/src/floating.c
    index f5c61782..6dd79668 100644
    --- a/src/floating.c
    +++ b/src/floating.c
    @@ -954,7 +954,7 @@ bool floating_reposition(Con *con, Rect newrect) {
             con->scratchpad_state = SCRATCHPAD_CHANGED;

         /* Workspace change will already result in a tree_render. */
    -    if (!reassigned) {
    +    if (!reassigned && workspace_is_visible(con_get_workspace(con))) {
             render_con(con);
             x_push_node(con);
         }
but I don't think that the extra complexity is worth it.

Change in handlers.c because of d2d6d6e0 where the bug also appears.

Fixes #3567
This commit is contained in:
Orestis Floros 2018-12-16 03:27:09 +02:00
parent a68542c8f7
commit 318528e3fc
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
2 changed files with 2 additions and 4 deletions

View File

@ -955,8 +955,7 @@ bool floating_reposition(Con *con, Rect newrect) {
/* Workspace change will already result in a tree_render. */ /* Workspace change will already result in a tree_render. */
if (!reassigned) { if (!reassigned) {
render_con(con); tree_render();
x_push_node(con);
} }
return true; return true;
} }

View File

@ -981,8 +981,7 @@ static bool handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t stat
Con *floating = con_inside_floating(con); Con *floating = con_inside_floating(con);
if (floating) { if (floating) {
floating_check_size(con, false); floating_check_size(con, false);
render_con(con); tree_render();
x_push_changes(croot);
} }
} }