Commit Graph

6832 Commits

Author SHA1 Message Date
Ingo Bürk 80ecadbe31
Merge pull request #3614 from NilsIrl/next
Add proper return code for i3-msg
2019-03-11 19:38:10 +01:00
Ingo Bürk 9d9b552b70
Merge pull request #3632 from orestisf1993/workspace_init
create_workspace_on_output: send workspace init event
2019-02-23 21:52:22 +01:00
Orestis Floros 098b0e6976
create_workspace_on_output: send workspace init event
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.
2019-02-23 12:00:55 +02:00
Nils ANDRÉ-CHANG 72ccd341fc Add proper return code for i3-msg 2019-02-21 19:52:55 +00:00
Michael Stapelberg 2d6e09a66a
i3-dump-log: make log message a little more clear (#3618)
This came up when trying to debug an issue.
2019-02-12 09:22:26 +01:00
Ingo Bürk e2d6117b8c
Merge pull request #3607 from vacuus/3546-fix-misleading-doc
Clear up confusion between event and reply types.
2019-02-01 08:24:34 +01:00
Alejandro Angulo 85e6742686 Reword documentation to make clear the difference in enumeration between event and reply types. 2019-01-31 23:00:00 -08:00
Michael Stapelberg a4309cb871 Merge branch 'release-4.16.1' 2019-01-27 16:45:31 +01:00
Michael Stapelberg becd97e2fb Set non-git version to 4.16.1-non-git. 2019-01-27 16:45:31 +01:00
Michael Stapelberg b4f9ff91d4 release i3 4.16.1 2019-01-27 16:45:19 +01:00
Orestis Floros f7b6ae2836 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
2019-01-23 21:30:52 +01:00
Orestis f0e19d112c cmd_exit: Let i3_exit handle shutdown (#3600)
- __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
2019-01-23 21:21:46 +01:00
Orestis Floros 4f768c6eda Fix crash with popups when fullscreen is non-leaf
Introduced in b3e69ed12

Fixes #3582
2019-01-23 21:21:34 +01:00
Orestis 54e7a31568 Use ipc queue for all messages (#3585)
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.
2019-01-23 21:21:28 +01:00
Orestis Floros cf375927f0 attach_to_workspace: set new parent before tree_render
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
2019-01-23 21:20:08 +01:00
Orestis Floros f43f412771 Apply title_align to non-leaf containers
Additionally, marks will now display for non-leaf containers.

Fixes #3540.
2019-01-23 21:20:04 +01:00
Orestis Floros 0377970dab Truncate wm_name utf8 strings to first zero byte
Fixes #3515
2019-01-23 21:20:00 +01:00
Orestis 02bb2693f9 cmd_exit: Let i3_exit handle shutdown (#3600)
- __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
2019-01-22 21:35:44 +01:00
Ingo Bürk 82a35a2418
Merge pull request #3590 from nejni-marji/next
Make binding modes case sensitive

closes #3587
2019-01-18 23:37:09 +01:00
Jonathan Woodlief 2a1ca0951e Update userguide to describe border styles better
Describe the difference between normal and pixel titlebars better

Thanks to @JonWoodlief
2019-01-18 23:35:47 +01:00
nejni-marji 22ac5827b0 Make binding modes case sensitive 2019-01-16 19:32:24 -06:00
Orestis 5aa0459be0 Use ipc queue for all messages (#3585)
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.
2019-01-12 13:13:03 +01:00
Ingo Bürk e2e964151e
Merge pull request #3584 from orestisf1993/popup-SIGSEGV
Fix crash with popups when fullscreen is non-leaf
2019-01-11 14:01:56 +01:00
Orestis Floros 0abb4f7e88
Fix crash with popups when fullscreen is non-leaf
Introduced in b3e69ed12

Fixes #3582
2019-01-11 14:46:13 +02:00
Orestis 00bb9a8483
Merge pull request #3574 from pclouds/no-newline-in-errx
Remove \n from errx and die messages
2019-01-02 14:30:17 +02:00
Nguyễn Thái Ngọc Duy 6462cf1ca3
Remove \n from errx and die messages
errx() already appends \n internally. "\n" in the error message will
result in a blank line after the message. die() is just a wrapper around
errx() so it receives the same treatment.
2019-01-02 14:23:56 +02:00
Ingo Bürk 3e3257af18
Merge pull request #3563 from CyberShadow/doc-mark-todo
userguide: Un-hide a TODO block completed in 2011
2018-12-16 09:36:02 +01:00
Ingo Bürk 982ede5901
Merge pull request #3568 from orestisf1993/floating_reposition-render_con
Fix: render_con shows floating containers on wrong workspace
2018-12-16 09:33:25 +01:00
Orestis Floros 318528e3fc
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
2018-12-16 03:49:21 +02:00
Ingo Bürk a68542c8f7
Merge pull request #3566 from orestisf1993/focus-events
Focus events
2018-12-15 18:29:46 +01:00
Orestis Floros fb1ae61d1c
Invalidate last_focused when focusing the EWMH support window
Fixes #3562
2018-12-14 23:47:48 +02:00
Orestis Floros dd708199ea
Fix: killing unfocused window shouldn't produce focus event 2018-12-14 23:46:21 +02:00
Orestis Floros f70c3b168d
Update tree_close_internal documentation in tree.h
After f90840337
2018-12-14 23:46:21 +02:00
Vladimir Panteleev 7d89e90137
userguide: Un-hide a TODO block completed in 2011
The userguide contained a commented-out section for marks, which
included the line:

> TODO: make i3-input replace %s

The line was added in a26a11c609 (May
2011), at which point i3-input did not have a -F switch. The switch
was added only in 1737a78fcd (September
2011), but the documentation was never updated to enable the
commented-out examples.
2018-12-14 13:16:11 +00:00
Orestis e6be6fea74
Merge pull request #3560 from CyberShadow/doc-mark-replace
userguide: Document mark --replace flag
2018-12-14 10:39:49 +02:00
Vladimir Panteleev fdda9763b7
userguide: Document mark --replace flag
- Explicitly document --replace, which was previously only mentioned
  in the command syntax.

- Improve wording: "a window can only have one mark" is slightly
  misleading because it appears to describe the limitation as a
  property of the model, whereas this actually pertains the mark
  command.
2018-12-14 08:33:42 +00:00
Ingo Bürk be6619ff11
Merge pull request #3557 from orestisf1993/regress-float-move
attach_to_workspace: set new parent before tree_render
2018-12-12 21:02:41 +01:00
Orestis Floros 605b6ba00f
attach_to_workspace: set new parent before tree_render
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
2018-12-12 19:12:01 +02:00
Orestis 376833db45
Merge pull request #3510 from orestisf1993/tree.t
Introduce cmp_tree test function
2018-12-12 13:19:43 +02:00
Orestis Floros 90c08a52f0
Introduce cmp_tree test function
Related to #3503
2018-12-12 13:09:15 +02:00
Ingo Bürk 32188d7b2c
Merge pull request #3551 from xzfc/baf-restart
Preserve back_and_forth during restart
2018-12-11 20:53:08 +01:00
Albert Safin 64ab1f42b7 Preserve back_and_forth during restart
Add new key "previous_workspace_name" to the json dump of the root container.
2018-12-11 20:46:06 +07:00
Ingo Bürk 6a4d41c5c2
Merge pull request #3553 from stapelberg/hidpi
userguide: add a section about hidpi displays
2018-12-10 18:34:51 +01:00
Michael Stapelberg d3e954befd userguide: add a section about hidpi displays
This is a continuation of #3438.
2018-12-10 18:18:23 +01:00
Ingo Bürk f08119298e
Merge pull request #3549 from xzfc/small-fixes
Small fixes
2018-12-09 18:13:13 +01:00
Ingo Bürk b35c56687d
Merge pull request #3550 from tlercher/3535-display-check
Fix #3535 - Check for DISPLAY when requesting version information
2018-12-09 18:10:42 +01:00
TAL b479dc1a0f Fix #3535 - Check for DISPLAY when requesting version information 2018-12-09 02:20:47 +01:00
Albert Safin 27030c8566 Code style: fix misaligned and misindented comments 2018-12-09 08:04:55 +07:00
Albert Safin b6282b47bc Remove unused con_get_next()
This function has unused for a long time since the commit
8f4b9ddaa4.
2018-12-09 08:04:41 +07:00
Albert Safin 0eb07dea5c Remove unnecessary code in route_click()
This case is handled by resize_find_tiling_participants() anyway which
is introduced in the commit dbec5eb905.
2018-12-09 07:48:40 +07:00