Also fixes an issue where action would be called if the button press was
on a separator. For example, if a user scrolled on a separator, the
workspace would change.
Applies to --release commands as well.
Closes#3635.
Probably the bug can still happen when a tree_close_internal happens
inside a workspace_show but modifying the code to avoid them seems to
not be worth it.
- The result from con_get_output was always not NULL because
con_get_output asserts so
- get_output_by_name should always be able to get an output from the
corresponding container
- workspace_move_to_output doesn't return bool anymore since it can't
fail
This is a regression from bce088679.
An other way to fix this would be to concatenate strings inside the
strtok loop when an output starts with a double quote but I'd rather
let the parser do the word splitting.
Fixes#3646
This fixes a crash which I could not reproduce in a testcase with reasonable effort, but the user reported the fix works.
Compare with src/x.c:946.
fixes#3554fixes#3645
Fixes#3595
Like the issue mentions:
> instead of the newly created workspace (not referenced by variable
> here) the `"init"` event is fired with the current workspace (`ws`).
Plus, there was another issue where duplicate workspace init events
where being sent because of workspace_get().
304-ipc-workspace-init.t: Subtest "move workspace to output" fails with
current next.
Fixes#3631
No event was being sent here:
2d6e09a66a/src/randr.c (L487)
533-randr15.t: I confirmed that SKIP still works if the xrandr command
fails.
Added test fails with current next.
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
- __lsan_do_leak_check() will terminate the process, so move it to the
end of the function.
- ev_loop_destroy() must be called after ipc_shutdown() because the
latter calls ev_ functions.
Fixes#3599
I was able to reproduce #3579 in Linux by running:
`sudo sysctl net.core.wmem_default=10000`
If a subscription message was too big to be sent at once, it was
possible to break a client by sending a reply to an other message sent
by the client. Eg:
- Write 8192 out of 11612 bytes of a workspace event.
- Blockingly write the reply to a workspace change message.
- Write the rest 3420 bytes of the workspace event.
This commit fixes this by utilizing the ipc queue for all types of
writes.
ipc_receive_message can only be called from a callback started in
ipc_new_client. This callback uses the same file descriptor with the
client also created in ipc_new_client. When the client is deleted, the
read callback is now also stopped. Thus, we can assume that whenever
ipc_receive_message is called, the corresponding client should still
exist.
- ipc_client now contains pointers to both write and read watchers. When
freed, a client will stop both of them.
- IPC_HANDLERs now work with ipc_clients instead of fds.
Fixes#3579.
on_remove_child calls tree_close_internal which calls tree_render and
the tree is in an invalid state if con->parent still points to the old
parent.
Fixes#3556
- __lsan_do_leak_check() will terminate the process, so move it to the
end of the function.
- ev_loop_destroy() must be called after ipc_shutdown() because the
latter calls ev_ functions.
Fixes#3599
I was able to reproduce #3579 in Linux by running:
`sudo sysctl net.core.wmem_default=10000`
If a subscription message was too big to be sent at once, it was
possible to break a client by sending a reply to an other message sent
by the client. Eg:
- Write 8192 out of 11612 bytes of a workspace event.
- Blockingly write the reply to a workspace change message.
- Write the rest 3420 bytes of the workspace event.
This commit fixes this by utilizing the ipc queue for all types of
writes.
ipc_receive_message can only be called from a callback started in
ipc_new_client. This callback uses the same file descriptor with the
client also created in ipc_new_client. When the client is deleted, the
read callback is now also stopped. Thus, we can assume that whenever
ipc_receive_message is called, the corresponding client should still
exist.
- ipc_client now contains pointers to both write and read watchers. When
freed, a client will stop both of them.
- IPC_HANDLERs now work with ipc_clients instead of fds.
Fixes#3579.