Commit Graph

6516 Commits

Author SHA1 Message Date
824d691640 add specific GitHub issue templates
I learnt about this from the GitHub blog:
https://blog.github.com/2018-05-02-issue-template-improvements/
2018-10-07 20:41:42 +02:00
2be4975f18 resolve_tilde: strncpy + strlen is pointless (#3436)
strlen already assumes that the string is NULL-terminated.

Like in https://github.com/i3/i3status/pull/312 but for whatever reason
gcc didn't warn about this here.
2018-10-07 20:26:37 +02:00
18dbfe699a userguide: Mention know issues for assign (#3434)
Fixes #3222
Fixes #3293
Related to #2060
2018-10-07 20:24:09 +02:00
acea46e16a configure.ac: add conditionals for building docs/mans
fixes #3378
2018-10-07 20:09:35 +02:00
5720ba65ab Merge pull request #3435 from vivien/i3-msg/subscribe
i3-msg/subscribe
2018-10-05 12:16:04 +03:00
cff4fadd72 i3-msg: add support for SUBSCRIBE message type
If i3-msg is invoked with -t subscribe, it will wait for the first event
matching the given payload, before exiting.

For instance, get the number of the next focused workspace with:

    i3-msg -t subscribe '[ "workspace" ]' | jshon -e current -e num

Like inotifywait, the -m flag allows to wait indefinitely for events,
instead of exiting right after receiving the first one.

For example, continuously monitor the names of focused windows with:

    i3-msg -t subscribe -m '[ "window" ]' | jq .container.name
2018-10-04 12:54:45 -04:00
d722d1b0e6 i3-msg: check reply in quiet mode
i3-msg currently exits right after sending the IPC message if the quiet
flag is set. This means that if an error occurred when issuing a
command, e.g. "i3-msg -q foobar", it gets silently ignored.

What we really want is to just skip printing but still check the reply.

At the same time, explicitly print the reply when we need to, instead of
using an exit label.
2018-10-03 10:43:09 -04:00
3b73edb511 Merge pull request #3430 from Synray/aspect_ratio
[RFC] Correctly calculate max_aspect
2018-10-02 03:04:21 +03:00
0ede8b9365 Correctly calculate max_aspect 2018-09-28 17:34:18 -07:00
b8b5a61a2d Merge pull request #3415 from orestisf1993/g_utf8_make_valid
Check g_utf8_make_valid availability
2018-09-28 18:00:06 +02:00
ebf40889a1 Merge pull request #3424 from orestisf1993/con_num_windows
con_num_windows: Count floating windows
2018-09-28 09:27:58 +02:00
5e1d327e43 con_num_windows: Count floating windows
Fixes #3423.
2018-09-26 20:04:17 +03:00
27afc572c1 Merge pull request #3421 from Streetwalrus/iconic-state
Reject requests for WM_STATE_ICONIC
2018-09-26 09:07:16 +02:00
6877205ac1 Reject requests for WM_STATE_ICONIC
For compatiblity reasons, Wine will request iconic state and cannot
ensure that the WM has agreed on it; immediately revert to normal to
avoid being stuck in a paused state.
2018-09-25 15:04:55 +03:00
daf5ca111f Provide g_utf8_make_valid if not available
See #3415 for licensing discussion.

Fixes Airblader/i3#236
2018-09-25 10:28:20 +03:00
aa8215194c Fix typo: terminaison -> termination 2018-09-24 20:53:36 +03:00
bec227236b Merge pull request #3420 from orestisf1993/sncontext==NULL-3419
i3-nagbar & i3-config-wizard: check sncontext != NULL
2018-09-23 20:12:16 +02:00
d080f58299 i3-nagbar & i3-config-wizard: check sncontext != NULL
From
07237ff25d/libsn/sn-common.c (L87-L171)
it appears that SnDisplay can't be NULL, so I skipped the check.

Fixes #3419
2018-09-23 17:06:29 +03:00
ac88d06632 Merge pull request #3416 from orestisf1993/530-bug-2229.t
530-bug-229.t: Get rid of smartmatch
2018-09-20 18:52:33 +02:00
bf9da466db 530-bug-229.t: Get rid of smartmatch 2018-09-20 19:37:50 +03:00
7c21b5995d Merge pull request #3400 from Synray/next
Respect max size from WM_NORMAL_HINTS
2018-09-20 11:36:22 +03:00
690e6d1f0e Respect max size in WM_NORMAL_HINTS 2018-09-20 11:31:19 +03:00
bde4f40b67 Merge pull request #3408 from orestisf1993/__focused__-crash
match_matches_window: Check if focused->window exists
2018-09-19 14:42:28 +02:00
ea559966b5 Merge pull request #3410 from orestisf1993/min_width
docs/i3bar-protocol: Mention skipping blocks with empty full_text
2018-09-17 16:06:27 +02:00
2b898f4c90 Merge pull request #3386 from orestisf1993/click-event
Fix "relative_x" and "width" of click events
2018-09-16 15:48:36 +02:00
9b06f1ab05 docs/i3bar-protocol: Mention skipping blocks with empty full_text
Closes #3405.
2018-09-16 15:04:20 +03:00
fed059a2b7 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.
2018-09-16 14:58:20 +03:00
515dd45f59 match_matches_window: Check if focused->window exists
Fixes #3406.
2018-09-16 14:55:27 +03:00
633583de4a Merge pull request #3409 from orestisf1993/sb_hoff_px
i3bar: Include sb_hoff_px only when needed
2018-09-16 11:11:47 +02:00
9936d049cf i3bar: Include sb_hoff_px only when needed
Fixes #3404.
2018-09-15 13:27:18 +03:00
18f705a978 Merge pull request #3403 from orestisf1993/issue-3402
_con_move_to_con: Move upwards only on CT_FLOATING_CON
2018-09-14 15:17:13 +02:00
d407393d0d _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.
2018-09-14 16:13:41 +03:00
c7132ec5b0 Merge pull request #3401 from orestisf1993/dump-asy-floating
dump-asy.pl: Include floating_nodes
2018-09-14 13:29:07 +02:00
702e83c95e dump-asy.pl: Include floating_nodes 2018-09-14 14:05:51 +03:00
ede954128a Merge pull request #3342 from orestisf1993/tree_close_internal
Simplify tree_close_internal
2018-09-14 12:24:54 +02:00
badcb152f9 Merge pull request #3399 from orestisf1993/156-fullscreen-focus
Make t/156-fullscreen-focus.t easier to work with
2018-09-14 08:19:00 +02:00
9c2ff947e1 Merge pull request #3398 from orestisf1993/i3-save-tree
i3-save-tree: Exclude unsupported "transient_for" property
2018-09-14 08:18:32 +02:00
68628e153f 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.
2018-09-13 17:18:34 +03:00
f6bb1e22bb init_ws_for_output: Remove content argument 2018-09-12 16:53:20 +03:00
5976381012 output_init_con: Restore focus if possible
Before this, i3 would focus newly created workspaces on output init
2018-09-12 16:47:18 +03:00
db3b9e4187 randr_disable_output: Always restore focus
con_detach and con_attach modify the focus stack.

This will make sure that the currently focused workspace will remain
focused after disabling an output.
2018-09-12 16:46:47 +03:00
4d21f4cfc2 init_ws_for_output: use workspace_move_to_output
This fixes a crash produced with the following config:
    # i3 config file (v4)
    workspace 1 output $screen1
    workspace 2 output $screen2

    exec --no-startup-id "i3-msg workspace 1, open && i3-msg workspace 2 && xrandr --output $screen2 --off && xrandr --output $screen1 --auto --output $screen2 --auto --right-of $screen1 "

Which results in:
ERROR: AddressSanitizer: heap-use-after-free on address …
READ of size 8 at 0x614000001f48 thread T0
    #0 0x5563df6e73a8 in init_ws_for_output i3/src/randr.c:468
    #1 0x5563df6ef3b4 in randr_query_outputs i3/src/randr.c:940
    #2 0x5563df68dbe1 in handle_screen_change i3/src/handlers.c:450

… is located 264 bytes inside of 448-byte region …
freed by thread T0 here:
    #1 0x5563df634b0a in con_free i3/src/con.c:96
    #2 0x5563df7151e6 in tree_close_internal i3/src/tree.c:344
    #3 0x5563df7280fe in workspace_show i3/src/workspace.c:499
    #4 0x5563df6e7315 in init_ws_for_output i3/src/randr.c:457
    #5 0x5563df6ef3b4 in randr_query_outputs i3/src/randr.c:940
    #6 0x5563df68dbe1 in handle_screen_change i3/src/handlers.c:450

Which is similar to #3228, #3248.
2018-09-12 16:46:47 +03:00
a66048a956 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.
2018-09-12 14:13:56 +03:00
484854d52f Merge pull request #3395 from lousyd/next
clarify JSON standard non-compliance
2018-09-12 10:24:30 +02:00
1a6c971052 Merge pull request #3396 from orestisf1993/commands
commands.c: Improve error replies
2018-09-12 10:24:06 +02:00
e67be1ccd3 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.
2018-09-11 08:35:58 +03:00
3bfcbb88bf 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.
2018-09-10 16:31:25 -04:00
83327abae4 Merge pull request #3394 from orestisf1993/validate-utf8
libi3: validate UTF8 strings
2018-09-10 09:00:54 +02:00
6a1f653508 libi3: validate UTF8 strings
Will validate container / window titles.

Fixes #3156.
2018-09-10 02:00:32 +03:00
a3dcee35f3 tree_restore: Check croot
Related to #2414, #3156.
2018-09-09 16:11:48 +03:00