]> git.sur5r.net Git - i3/i3/log
i3/i3
6 years agocon_num_windows: Count floating windows 3424/head
Orestis Floros [Wed, 26 Sep 2018 16:56:55 +0000 (19:56 +0300)]
con_num_windows: Count floating windows

Fixes #3423.

6 years agoMerge pull request #3420 from orestisf1993/sncontext==NULL-3419
Ingo Bürk [Sun, 23 Sep 2018 18:12:16 +0000 (20:12 +0200)]
Merge pull request #3420 from orestisf1993/sncontext==NULL-3419

i3-nagbar & i3-config-wizard: check sncontext != NULL

6 years agoi3-nagbar & i3-config-wizard: check sncontext != NULL 3420/head
Orestis Floros [Sun, 23 Sep 2018 14:02:21 +0000 (17:02 +0300)]
i3-nagbar & i3-config-wizard: check sncontext != NULL

From
https://github.com/freedesktop/startup-notification/blob/07237ff25d6171e1b548118442ddba4259a53ba5/libsn/sn-common.c#L87-L171
it appears that SnDisplay can't be NULL, so I skipped the check.

Fixes #3419

6 years agoMerge pull request #3416 from orestisf1993/530-bug-2229.t
Ingo Bürk [Thu, 20 Sep 2018 16:52:33 +0000 (18:52 +0200)]
Merge pull request #3416 from orestisf1993/530-bug-2229.t

530-bug-229.t: Get rid of smartmatch

6 years ago530-bug-229.t: Get rid of smartmatch 3416/head
Orestis Floros [Thu, 20 Sep 2018 16:37:50 +0000 (19:37 +0300)]
530-bug-229.t: Get rid of smartmatch

6 years agoMerge pull request #3400 from Synray/next
Orestis [Thu, 20 Sep 2018 08:36:22 +0000 (11:36 +0300)]
Merge pull request #3400 from Synray/next

Respect max size from WM_NORMAL_HINTS

6 years agoRespect max size in WM_NORMAL_HINTS 3400/head
Thomas Fischer [Thu, 13 Sep 2018 23:16:45 +0000 (16:16 -0700)]
Respect max size in WM_NORMAL_HINTS

6 years agoMerge pull request #3408 from orestisf1993/__focused__-crash
Ingo Bürk [Wed, 19 Sep 2018 12:42:28 +0000 (14:42 +0200)]
Merge pull request #3408 from orestisf1993/__focused__-crash

match_matches_window: Check if focused->window exists

6 years agoMerge pull request #3410 from orestisf1993/min_width
Ingo Bürk [Mon, 17 Sep 2018 14:06:27 +0000 (16:06 +0200)]
Merge pull request #3410 from orestisf1993/min_width

docs/i3bar-protocol: Mention skipping blocks with empty full_text

6 years agoMerge pull request #3386 from orestisf1993/click-event
Ingo Bürk [Sun, 16 Sep 2018 13:48:36 +0000 (15:48 +0200)]
Merge pull request #3386 from orestisf1993/click-event

Fix "relative_x" and "width" of click events

6 years agodocs/i3bar-protocol: Mention skipping blocks with empty full_text 3410/head
Orestis Floros [Sun, 16 Sep 2018 12:04:20 +0000 (15:04 +0300)]
docs/i3bar-protocol: Mention skipping blocks with empty full_text

Closes #3405.

6 years agoFix "relative_x" and "width" of click events 3386/head
Orestis Floros [Wed, 5 Sep 2018 23:21:10 +0000 (02:21 +0300)]
Fix "relative_x" and "width" of click events

Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.

Fixes #3380.

6 years agomatch_matches_window: Check if focused->window exists 3408/head
Orestis Floros [Sat, 15 Sep 2018 09:07:10 +0000 (12:07 +0300)]
match_matches_window: Check if focused->window exists

Fixes #3406.

6 years agoMerge pull request #3409 from orestisf1993/sb_hoff_px
Ingo Bürk [Sun, 16 Sep 2018 09:11:47 +0000 (11:11 +0200)]
Merge pull request #3409 from orestisf1993/sb_hoff_px

i3bar: Include sb_hoff_px only when needed

6 years agoi3bar: Include sb_hoff_px only when needed 3409/head
Orestis Floros [Sat, 15 Sep 2018 10:27:18 +0000 (13:27 +0300)]
i3bar: Include sb_hoff_px only when needed

Fixes #3404.

6 years agoMerge pull request #3403 from orestisf1993/issue-3402
Ingo Bürk [Fri, 14 Sep 2018 13:17:13 +0000 (15:17 +0200)]
Merge pull request #3403 from orestisf1993/issue-3402

_con_move_to_con: Move upwards only on CT_FLOATING_CON

6 years ago_con_move_to_con: Move upwards only on CT_FLOATING_CON 3403/head
Orestis Floros [Fri, 14 Sep 2018 13:09:45 +0000 (16:09 +0300)]
_con_move_to_con: Move upwards only on CT_FLOATING_CON

If target is inside a floating container but not its direct child, the
move can be completed as is.

Fixes #3402.

6 years agoMerge pull request #3401 from orestisf1993/dump-asy-floating
Ingo Bürk [Fri, 14 Sep 2018 11:29:07 +0000 (13:29 +0200)]
Merge pull request #3401 from orestisf1993/dump-asy-floating

dump-asy.pl: Include floating_nodes

6 years agodump-asy.pl: Include floating_nodes 3401/head
Orestis Floros [Fri, 14 Sep 2018 11:04:54 +0000 (14:04 +0300)]
dump-asy.pl: Include floating_nodes

6 years agoMerge pull request #3342 from orestisf1993/tree_close_internal
Ingo Bürk [Fri, 14 Sep 2018 10:24:54 +0000 (12:24 +0200)]
Merge pull request #3342 from orestisf1993/tree_close_internal

Simplify tree_close_internal

6 years agoMerge pull request #3399 from orestisf1993/156-fullscreen-focus
Ingo Bürk [Fri, 14 Sep 2018 06:19:00 +0000 (08:19 +0200)]
Merge pull request #3399 from orestisf1993/156-fullscreen-focus

Make t/156-fullscreen-focus.t easier to work with

6 years agoMerge pull request #3398 from orestisf1993/i3-save-tree
Ingo Bürk [Fri, 14 Sep 2018 06:18:32 +0000 (08:18 +0200)]
Merge pull request #3398 from orestisf1993/i3-save-tree

i3-save-tree: Exclude unsupported "transient_for" property

6 years agoMake t/156-fullscreen-focus.t easier to work with 3399/head
Orestis Floros [Thu, 13 Sep 2018 11:09:35 +0000 (14:09 +0300)]
Make t/156-fullscreen-focus.t easier to work with

- Add routine that will refocus the expected window on test failure.
Thus, failure on one test will not make others fail.
- Remove some redundant commands, prefer fresh_workspace for screen
changing.
- Kill previous windows between sections if the next section does not
depend on the previous layout.

6 years agoi3-save-tree: Exclude unsupported "transient_for" property 3398/head
Orestis Floros [Wed, 12 Sep 2018 11:11:08 +0000 (14:11 +0300)]
i3-save-tree: Exclude unsupported "transient_for" property

Even if i3 supported matching windows through "transient_for", it
wouldn't be useful for the purpose of i3-save-tree.

6 years agoMerge pull request #3395 from lousyd/next
Ingo Bürk [Wed, 12 Sep 2018 08:24:30 +0000 (10:24 +0200)]
Merge pull request #3395 from lousyd/next

clarify JSON standard non-compliance

6 years agoMerge pull request #3396 from orestisf1993/commands
Ingo Bürk [Wed, 12 Sep 2018 08:24:06 +0000 (10:24 +0200)]
Merge pull request #3396 from orestisf1993/commands

commands.c: Improve error replies

6 years agocommands.c: Improve error replies 3396/head
Orestis Floros [Tue, 11 Sep 2018 04:44:40 +0000 (07:44 +0300)]
commands.c: Improve error replies

- Improve / add various error messages.
- Replace all `LOG(…); ysuccess(false);` with `yerror(…);`.
- switch_mode: Remove redundant "ERROR:" ELOG string.
- cmd_move_con_to_workspace*: Make sure that we don't try to move an
empty workspace to another workspace. This can be problematic when we
match a workspace using command criteria (eg marks) and the target is a
non-existing workspace. We create the new workspace but since nothing is
moved there, we are left with an empty workspace. See added testcase.

6 years agoclarify JSON standard non-compliance 3395/head
Todd Walton [Mon, 10 Sep 2018 20:31:25 +0000 (16:31 -0400)]
clarify JSON standard non-compliance

Modified section on the layout file's non-compliance with the JSON
standard. The section previously stated that having multiple top-level
JSON texts is non-compliant. This isn't the case. It's just that most
JSON parsers will treat that as if it is non-compliant.

6 years agoMerge pull request #3394 from orestisf1993/validate-utf8
Michael Stapelberg [Mon, 10 Sep 2018 07:00:54 +0000 (09:00 +0200)]
Merge pull request #3394 from orestisf1993/validate-utf8

 libi3: validate UTF8 strings

6 years agolibi3: validate UTF8 strings 3394/head
Orestis Floros [Sun, 9 Sep 2018 12:32:54 +0000 (15:32 +0300)]
libi3: validate UTF8 strings

Will validate container / window titles.

Fixes #3156.

6 years agotree_restore: Check croot
Orestis Floros [Sun, 9 Sep 2018 13:09:39 +0000 (16:09 +0300)]
tree_restore: Check croot

Related to #2414, #3156.

6 years agoMerge pull request #3391 from orestisf1993/yajl-utf8
Ingo Bürk [Thu, 6 Sep 2018 12:15:54 +0000 (14:15 +0200)]
Merge pull request #3391 from orestisf1993/yajl-utf8

tree_append_json: Allow strings that are not valid UTF8

6 years agotree_append_json: Allow strings that are not valid UTF8 3391/head
Orestis Floros [Thu, 6 Sep 2018 11:54:27 +0000 (14:54 +0300)]
tree_append_json: Allow strings that are not valid UTF8

Fixes #3156.

I couldn't reproduce the problem in a "natural" way so I cheated:
1. Start i3 with gdb
2. Set breakpoing on tree_restore
3. Run, open window, i3-msg restart
5. Open the file in *path with a hex editor
6. Edit the "name" field of the window and insert bytes that are not
valid UTF8
7. Continue

After parsing fails, all nodes including croot are incomplete, meaning
they have to be deleted. We can't recover in any reasonable way so we
have to allow non-UTF8 characters to avoid this situation altogether.

6 years agotree_append_json: don't focus freed container
Orestis Floros [Thu, 6 Sep 2018 11:48:21 +0000 (14:48 +0300)]
tree_append_json: don't focus freed container

6 years agoMerge pull request #3389 from orestisf1993/resize-ensure-1px
Ingo Bürk [Thu, 6 Sep 2018 06:41:00 +0000 (08:41 +0200)]
Merge pull request #3389 from orestisf1993/resize-ensure-1px

Ensure containers have a size of at least 1px after resize

6 years agoMerge pull request #3390 from orestisf1993/resize-tile
Ingo Bürk [Thu, 6 Sep 2018 06:38:53 +0000 (08:38 +0200)]
Merge pull request #3390 from orestisf1993/resize-tile

resize set for tiling: default to px when not specified

6 years agoMerge pull request #3388 from orestisf1993/cmd_rename_workspace
Ingo Bürk [Thu, 6 Sep 2018 06:38:03 +0000 (08:38 +0200)]
Merge pull request #3388 from orestisf1993/cmd_rename_workspace

cmd_rename_workspace: correct order of events

6 years agoresize set for tiling: default to px when not specified 3390/head
Orestis Floros [Thu, 6 Sep 2018 02:58:51 +0000 (05:58 +0300)]
resize set for tiling: default to px when not specified

6 years agoEnsure containers have a size of at least 1px after resize 3389/head
Orestis Floros [Thu, 6 Sep 2018 01:56:31 +0000 (04:56 +0300)]
Ensure containers have a size of at least 1px after resize

Fixes #2226.
Fixes #2776.
Fixes #3241.
Related to #3194.

6 years agocmd_rename_workspace: correct order of events 3388/head
Orestis Floros [Thu, 6 Sep 2018 00:11:47 +0000 (03:11 +0300)]
cmd_rename_workspace: correct order of events

1. Rename happens
2. Workspace is moved because of assignments
3. Workspace closes because it is empty (#3248)

Fixes #3248.

6 years agoImprove comment from #3245
Orestis Floros [Thu, 6 Sep 2018 00:38:45 +0000 (03:38 +0300)]
Improve comment from #3245

6 years agoconfigure.ac: fix AC_SEARCH_LIBS([shm_open]) for static linking (#3379)
Michael Stapelberg [Fri, 31 Aug 2018 14:59:08 +0000 (08:59 -0600)]
configure.ac: fix AC_SEARCH_LIBS([shm_open]) for static linking (#3379)

Without specifying -pthread, the conftest fails and -lrt is missing during
compilation of i3, resulting in a failing build.

6 years agoMerge pull request #3376 from orestisf1993/floating-disable-scratchpad
Ingo Bürk [Tue, 28 Aug 2018 11:30:57 +0000 (13:30 +0200)]
Merge pull request #3376 from orestisf1993/floating-disable-scratchpad

Don't disable floating in internal workspaces

6 years agoDon't disable floating in internal workspaces 3376/head
Orestis Floros [Tue, 28 Aug 2018 07:26:07 +0000 (10:26 +0300)]
Don't disable floating in internal workspaces

6 years agoMerge pull request #3375 from orestisf1993/ipc_client_timeout
Ingo Bürk [Tue, 28 Aug 2018 08:20:45 +0000 (10:20 +0200)]
Merge pull request #3375 from orestisf1993/ipc_client_timeout

ipc_client_timeout: Fix build when not on linux

6 years agoipc_client_timeout: Fix build when not on linux 3375/head
Orestis Floros [Mon, 27 Aug 2018 19:19:36 +0000 (22:19 +0300)]
ipc_client_timeout: Fix build when not on linux

Also moved the 'end' label because it is unused otherwise.

Reported here: https://github.com/Airblader/i3/issues/233

6 years agoMerge pull request #3374 from orestisf1993/startup-notification
Ingo Bürk [Mon, 27 Aug 2018 09:19:26 +0000 (11:19 +0200)]
Merge pull request #3374 from orestisf1993/startup-notification

Support startup-notification in i3-nagbar & i3-config-wizard

6 years agoSupport startup-notification in i3-nagbar & i3-config-wizard 3374/head
Orestis Floros [Sat, 25 Aug 2018 11:48:14 +0000 (14:48 +0300)]
Support startup-notification in i3-nagbar & i3-config-wizard

The default i3 config uses the `exec` command without `--no-startup-id`
to launch:
1. i3-nagbar
https://github.com/i3/i3/blob/4cba9fcbdab1487459014dbf8882f5f34e61435e/etc/config#L150
2. i3-config-wizard
https://github.com/i3/i3/blob/4cba9fcbdab1487459014dbf8882f5f34e61435e/etc/config#L194

A user that opens i3 for the first time will be greeted with a "loading"
cursor because of i3-config-wizard.

6 years agoi3-config-wizard: fix small memleak
Orestis Floros [Sat, 25 Aug 2018 11:49:28 +0000 (14:49 +0300)]
i3-config-wizard: fix small memleak

6 years agoMerge pull request #3368 from orestisf1993/render_root
Ingo Bürk [Fri, 24 Aug 2018 07:49:41 +0000 (09:49 +0200)]
Merge pull request #3368 from orestisf1993/render_root

(floating) global fullscreen bugs & others

6 years agoMerge pull request #3372 from orestisf1993/direction
Ingo Bürk [Fri, 24 Aug 2018 07:43:20 +0000 (09:43 +0200)]
Merge pull request #3372 from orestisf1993/direction

Resize tile px

6 years agoMake resize set ppt more accurate 3372/head
Orestis Floros [Fri, 24 Aug 2018 00:50:23 +0000 (03:50 +0300)]
Make resize set ppt more accurate

See the testcase for the usecase.

6 years agoMake resize set px work with tiling containers
Orestis Floros [Fri, 24 Aug 2018 00:06:52 +0000 (03:06 +0300)]
Make resize set px work with tiling containers

6 years ago541-resize-set-tiling.t: fix "my" variable mask warnings
Orestis Floros [Fri, 24 Aug 2018 00:18:01 +0000 (03:18 +0300)]
541-resize-set-tiling.t: fix "my" variable mask warnings

6 years agocmd_resize* statics: remove useless 'way' argument
Orestis Floros [Fri, 24 Aug 2018 00:03:26 +0000 (03:03 +0300)]
cmd_resize* statics: remove useless 'way' argument

6 years agoMake cmd_resize_tiling_width_height work with pixels
Orestis Floros [Thu, 23 Aug 2018 23:14:11 +0000 (02:14 +0300)]
Make cmd_resize_tiling_width_height work with pixels

6 years agoMake cmd_resize_tiling_direction work with pixels
Orestis Floros [Thu, 23 Aug 2018 19:09:52 +0000 (22:09 +0300)]
Make cmd_resize_tiling_direction work with pixels

Introduces resize_neighboring_cons in resize.c which is also used by
resize_graphical_handler.

Co-authored-by: Andrew Laucius <andrewla@gmail.com>
Authored original code and tests in #3240. I rewrote most of the
resizing code and fixed the failing tests.

6 years agoprecalculate_sizes: don't malloc needlessly
Orestis Floros [Fri, 24 Aug 2018 00:02:15 +0000 (03:02 +0300)]
precalculate_sizes: don't malloc needlessly

6 years agoprecalculate_sizes: round sizes instead of flooring them
Orestis Floros [Thu, 23 Aug 2018 18:57:21 +0000 (21:57 +0300)]
precalculate_sizes: round sizes instead of flooring them

This will lead to more accurate and consistent container sizes.

Needed to fix the failing test of #3240.

6 years agoImprove resize_graphical_handler code style
Orestis Floros [Thu, 23 Aug 2018 18:04:52 +0000 (21:04 +0300)]
Improve resize_graphical_handler code style

- int return type is not useful
- Consistent comment style

6 years agoIntroduce parse_direction
Orestis Floros [Thu, 23 Aug 2018 12:36:50 +0000 (15:36 +0300)]
Introduce parse_direction

Also fixes the following bug: in the fix for #1011 in
cmd_resize_floating direction "width" is not considered.

Influenced by #3240.

6 years agoIntroduce orientation_from_direction
Orestis Floros [Thu, 23 Aug 2018 12:36:23 +0000 (15:36 +0300)]
Introduce orientation_from_direction

6 years agoMerge pull request #3369 from orestisf1993/clang-format
Ingo Bürk [Wed, 22 Aug 2018 18:29:32 +0000 (20:29 +0200)]
Merge pull request #3369 from orestisf1993/clang-format

Apply compatible changes from clang-format 6.0.1

6 years agoApply compatible changes from clang-format 6.0.1 3369/head
Orestis Floros [Wed, 22 Aug 2018 11:51:17 +0000 (14:51 +0300)]
Apply compatible changes from clang-format 6.0.1

These are the changes that clang-format 6.0.1 makes to the codebase that
clang-format-3.8 doesn't change back.

Useful for those that use a more recent version of clang-format in their
local machines.

6 years agohandle_configure_request: check for scratchpad once 3368/head
Orestis Floros [Wed, 22 Aug 2018 11:23:01 +0000 (14:23 +0300)]
handle_configure_request: check for scratchpad once

6 years agohandle_configure_request: use 'goto out'
Orestis Floros [Wed, 22 Aug 2018 11:11:26 +0000 (14:11 +0300)]
handle_configure_request: use 'goto out'

6 years agohandle_configure_request: reuse 'workspace' variable
Orestis Floros [Wed, 22 Aug 2018 11:10:42 +0000 (14:10 +0300)]
handle_configure_request: reuse 'workspace' variable

6 years agocon_border_style: check con->fullscreen_mode directly
Orestis Floros [Wed, 22 Aug 2018 11:09:05 +0000 (14:09 +0300)]
con_border_style: check con->fullscreen_mode directly

6 years agoIntroduce con_get_fullscreen_covering_ws
Orestis Floros [Wed, 22 Aug 2018 11:02:27 +0000 (14:02 +0300)]
Introduce con_get_fullscreen_covering_ws

This commit will also fix the following bugs:
1. click.c: Users could drag global fullscreen floating containers.
2. render.c: Floating containers would get rendered with a global fullscreen container in another
workspace.

6 years agorender_root: fix popup_during_fullscreen logic
Orestis Floros [Wed, 22 Aug 2018 00:40:51 +0000 (03:40 +0300)]
render_root: fix popup_during_fullscreen logic

The first issue is that there seems to be a typo: fullscreen->window
should have been child->window. The corrected check is redundant since
the while loop checks if the transient_con has a window.

The second issue is that popup_during_fullscreen is never checked even
though the behaviour should be exclusive to the "smart" option.

6 years agoMerge pull request #3365 from orestisf1993/DRAG_REVERT
Ingo Bürk [Tue, 21 Aug 2018 18:39:26 +0000 (20:39 +0200)]
Merge pull request #3365 from orestisf1993/DRAG_REVERT

floating_drag_window: return on DRAG_REVERT

6 years agoMerge pull request #3366 from orestisf1993/NUM_HANDLERS
Ingo Bürk [Tue, 21 Aug 2018 18:38:31 +0000 (20:38 +0200)]
Merge pull request #3366 from orestisf1993/NUM_HANDLERS

property_notify: use NUM_HANDLERS

6 years agoMerge pull request #3367 from orestisf1993/dragloop_callback
Ingo Bürk [Tue, 21 Aug 2018 18:37:56 +0000 (20:37 +0200)]
Merge pull request #3367 from orestisf1993/dragloop_callback

Call dragloop callback on DRAG_SUCCESS

6 years agoCall dragloop callback on DRAG_SUCCESS 3367/head
Orestis Floros [Tue, 21 Aug 2018 18:10:02 +0000 (21:10 +0300)]
Call dragloop callback on DRAG_SUCCESS

A race condition is possible. For example, if we first receive a
XCB_MOTION_NOTIFY event and then, while drain_drag_events is still
running, a XCB_BUTTON_RELEASE event the first event is never handled
because we return.

This fixes the flakiness of the tests in #3085.

6 years agofloating_drag_window: return on DRAG_REVERT 3365/head
Orestis Floros [Tue, 21 Aug 2018 18:06:00 +0000 (21:06 +0300)]
floating_drag_window: return on DRAG_REVERT

Right now tree_render() is called twice on DRAG_REVERT since
floating_reposition calls it.
Also, on DRAG_REVERT the scratchpad state shouldn't change since the
user canceled the action.

6 years agoproperty_notify: use NUM_HANDLERS 3366/head
Orestis Floros [Tue, 21 Aug 2018 18:04:46 +0000 (21:04 +0300)]
property_notify: use NUM_HANDLERS

6 years agoMerge pull request #3364 from orestisf1993/warp-randr_query
Ingo Bürk [Fri, 17 Aug 2018 09:55:15 +0000 (11:55 +0200)]
Merge pull request #3364 from orestisf1993/warp-randr_query

randr_query_outputs: con_activate -> workspace_show

6 years agoUse con_focus instead of con_activate for workspace 3364/head
Orestis Floros [Fri, 17 Aug 2018 03:45:25 +0000 (06:45 +0300)]
Use con_focus instead of con_activate for workspace

6 years agoTypo: output -> content
Orestis Floros [Fri, 17 Aug 2018 03:45:20 +0000 (06:45 +0300)]
Typo: output -> content

6 years agorandr_query_outputs: con_activate -> workspace_show
Orestis Floros [Fri, 17 Aug 2018 03:06:56 +0000 (06:06 +0300)]
randr_query_outputs: con_activate -> workspace_show

workspace_show will call x_set_warp_to if needed.

Fixes #3333

6 years agoMerge pull request #3363 from orestisf1993/regress-scratchpad-focus
Ingo Bürk [Fri, 17 Aug 2018 09:42:29 +0000 (11:42 +0200)]
Merge pull request #3363 from orestisf1993/regress-scratchpad-focus

Call con_activate after moving scratchpad window to current ws

6 years agoCall con_activate after moving scratchpad window to current ws 3363/head
Orestis Floros [Fri, 17 Aug 2018 09:34:20 +0000 (12:34 +0300)]
Call con_activate after moving scratchpad window to current ws

Fixes #3361

6 years agoMerge pull request #3353 from orestisf1993/free_ws_assignments
Ingo Bürk [Thu, 9 Aug 2018 14:49:21 +0000 (16:49 +0200)]
Merge pull request #3353 from orestisf1993/free_ws_assignments

Free ws_assignments on reload

6 years agoFree ws_assignments on reload 3353/head
Orestis Floros [Thu, 9 Aug 2018 14:28:05 +0000 (17:28 +0300)]
Free ws_assignments on reload

This fixes an unreported bug where deleting a workspace assignment and
reloading the config file would keep the assignment.

6 years agoMerge pull request #3263 from orestisf1993/misbehaving-ipc-queue-2999
Michael Stapelberg [Wed, 8 Aug 2018 17:14:15 +0000 (19:14 +0200)]
Merge pull request #3263 from orestisf1993/misbehaving-ipc-queue-2999

 Kill misbehaving subscribed clients instead of hanging

6 years agoKill misbehaving subscribed clients instead of hanging 3263/head
Orestis Floros [Mon, 23 Apr 2018 09:20:05 +0000 (12:20 +0300)]
Kill misbehaving subscribed clients instead of hanging

This change only affects clients that are subscribed to events, which
should be the main cause of our problems.

In the common case (no buffered data) the behaviour doesn't change at
all: the message is sent directly, no ev_io / ev_timeout callback is
enabled. Once a write to a client's socket is not completed fully
(returns with EAGAIN error), we put the message in the tail of a queue
and init an ev_io callback and a corresponding timer. If the timer is
triggered first, the socket is closed and the client connection is
removed. If the socket becomes writeable before the timeout we either
reset the timer if we couldn't push all the buffered data or completely
remove it if everything was pushed.

We could also replace ipc_send_message() for all client connections in
i3, not just those subscribed to events.

Furthermore, we could limit the amount of messages stored and increase
the timeout (or use multiple timeouts): eg it's ok if a client is not
reading for 10 seconds and we are only holding 5KB of messages for them
but it is not ok if they are inactive for 5 seconds and we have 30MB of
messages held.

Closes #2999
Closes #2539

6 years agoAdded libiconv to search libs for OpenBSD patch (#3336)
Harry Lawrence [Sat, 4 Aug 2018 17:27:25 +0000 (18:27 +0100)]
Added libiconv to search libs for OpenBSD patch (#3336)

6 years agoMerge pull request #3319 from Stunkymonkey/format_placholders-case_sensitive
Ingo Bürk [Sat, 4 Aug 2018 07:23:11 +0000 (09:23 +0200)]
Merge pull request #3319 from Stunkymonkey/format_placholders-case_sensitive

make format_placeholders case-sensitive

6 years agoMerge pull request #3344 from downzer0/chore/i3-sensible-terminal--hyper
Ingo Bürk [Thu, 2 Aug 2018 15:05:29 +0000 (17:05 +0200)]
Merge pull request #3344 from downzer0/chore/i3-sensible-terminal--hyper

enhancement: adds hyper as a sensible terminal option

6 years agoenhancement: adds hyper as a sensible terminal option 3344/head
downzer0 [Tue, 31 Jul 2018 22:35:05 +0000 (17:35 -0500)]
enhancement: adds hyper as a sensible terminal option
- hyper.is

6 years agoIntroduce free_ipc_client
Orestis Floros [Sun, 22 Apr 2018 22:02:44 +0000 (01:02 +0300)]
Introduce free_ipc_client

6 years agoSimplify tree_close_internal 3342/head
Orestis Floros [Sun, 29 Jul 2018 22:56:51 +0000 (01:56 +0300)]
Simplify tree_close_internal

This commit makes multiple changes in tree_close_internal. I didn't
split them because they are not completely independent.

- Remove force_set_focus parameter
This parameter was always set to `false` throughout the code base except
for one case where it was set to `(con == focused)`, when killing a
floating con's parent (the one with type CT_FLOATING_CON). But this case
is not needed anymore since the special handling of CT_FLOATING_CONs in
con_next_focused was removed in #2941.
- Assume that con_next_focused does not returned a container of type
CT_DOCKAREA. This is reasonable since con_next_focused uses the
focus_head stack and has special handling of CT_DOCKAREA containers.
- Remove is_mapped
This variable was only used in the if block towards the end of
tree_close_internal. Ignoring the, now removed, dockarea code and the
use of force_set_focus this block performed only one useful action:
focus the `next` container when `con == focused`. `con == focused` was a
necessary and sufficient condition for the con_activate call:
if `con != focused` we could reach the inner if blocks because of the
other conditions but would never focus another container. If `con ==
focused` then all other conditions would be irrelevant.
- Remove special handling of floating containers
Since the `next` focused container is calculated through the parent for
floating containers, I moved this code to con_next_focused.
Also, because of the removal of force_set_focus, it appears that we can
call con_on_remove_child for floating containers as well.

6 years agoMerge pull request #3340 from PandorasFox/next
Ingo Bürk [Sun, 29 Jul 2018 10:10:26 +0000 (12:10 +0200)]
Merge pull request #3340 from PandorasFox/next

fix height offset calculation in pango text drawing

6 years agofix height offset calculation in pango text drawing 3340/head
Cassandra Fox [Sun, 29 Jul 2018 02:31:32 +0000 (19:31 -0700)]
fix height offset calculation in pango text drawing

6 years agoMerge pull request #3329 from lasers/next
Ingo Bürk [Mon, 16 Jul 2018 14:11:04 +0000 (16:11 +0200)]
Merge pull request #3329 from lasers/next

docs/i3bar-protocol: fix typo

6 years agodocs/i3bar-protocol: fix typo 3329/head
lasers [Mon, 16 Jul 2018 13:54:08 +0000 (08:54 -0500)]
docs/i3bar-protocol: fix typo

6 years agoMerge pull request #3254 from orestisf1993/issue-555
Ingo Bürk [Thu, 12 Jul 2018 14:18:13 +0000 (16:18 +0200)]
Merge pull request #3254 from orestisf1993/issue-555

Multiple assignments of workspaces to outputs (#555)

6 years agoAllow multiple assignments of workspaces to outputs 3254/head
Orestis Floros [Tue, 27 Mar 2018 21:55:20 +0000 (00:55 +0300)]
Allow multiple assignments of workspaces to outputs

Also makes get_assigned_output work with the primary output:
    workspace X output primary
will now work.

Fixes #555.

6 years agoMerge pull request #3327 from orestisf1993/rename-mouse-bug
Ingo Bürk [Thu, 12 Jul 2018 04:27:56 +0000 (06:27 +0200)]
Merge pull request #3327 from orestisf1993/rename-mouse-bug

cmd_rename_workspace: always call con_focus

6 years agoMerge pull request #3328 from orestisf1993/next
Ingo Bürk [Thu, 12 Jul 2018 04:27:13 +0000 (06:27 +0200)]
Merge pull request #3328 from orestisf1993/next

Fix ISSUE_TEMPLATE typo