Commit Graph

6809 Commits

Author SHA1 Message Date
Thomas Fischer 690e6d1f0e
Respect max size in WM_NORMAL_HINTS 2018-09-20 11:31:19 +03:00
Ingo Bürk 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
Ingo Bürk 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
Ingo Bürk 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
Orestis Floros 9b06f1ab05
docs/i3bar-protocol: Mention skipping blocks with empty full_text
Closes #3405.
2018-09-16 15:04:20 +03:00
Orestis Floros 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
Orestis Floros 515dd45f59
match_matches_window: Check if focused->window exists
Fixes #3406.
2018-09-16 14:55:27 +03:00
Ingo Bürk 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
Orestis Floros 9936d049cf
i3bar: Include sb_hoff_px only when needed
Fixes #3404.
2018-09-15 13:27:18 +03:00
Ingo Bürk 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
Orestis Floros 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
Ingo Bürk c7132ec5b0
Merge pull request #3401 from orestisf1993/dump-asy-floating
dump-asy.pl: Include floating_nodes
2018-09-14 13:29:07 +02:00
Orestis Floros 702e83c95e
dump-asy.pl: Include floating_nodes 2018-09-14 14:05:51 +03:00
Ingo Bürk ede954128a
Merge pull request #3342 from orestisf1993/tree_close_internal
Simplify tree_close_internal
2018-09-14 12:24:54 +02:00
Ingo Bürk 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
Ingo Bürk 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
Orestis Floros 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
Orestis Floros f6bb1e22bb
init_ws_for_output: Remove content argument 2018-09-12 16:53:20 +03:00
Orestis Floros 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
Orestis Floros 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
Orestis Floros 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
Orestis Floros 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
Ingo Bürk 484854d52f
Merge pull request #3395 from lousyd/next
clarify JSON standard non-compliance
2018-09-12 10:24:30 +02:00
Ingo Bürk 1a6c971052
Merge pull request #3396 from orestisf1993/commands
commands.c: Improve error replies
2018-09-12 10:24:06 +02:00
Orestis Floros 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
Todd Walton 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
Michael Stapelberg 83327abae4
Merge pull request #3394 from orestisf1993/validate-utf8
libi3: validate UTF8 strings
2018-09-10 09:00:54 +02:00
Orestis Floros 6a1f653508
libi3: validate UTF8 strings
Will validate container / window titles.

Fixes #3156.
2018-09-10 02:00:32 +03:00
Orestis Floros a3dcee35f3
tree_restore: Check croot
Related to #2414, #3156.
2018-09-09 16:11:48 +03:00
Ingo Bürk 9dc4df81ea
Merge pull request #3391 from orestisf1993/yajl-utf8
tree_append_json: Allow strings that are not valid UTF8
2018-09-06 14:15:54 +02:00
Orestis Floros be6faa3161
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.
2018-09-06 14:58:31 +03:00
Orestis Floros e8d2b9b7b5
tree_append_json: don't focus freed container 2018-09-06 14:48:21 +03:00
Ingo Bürk cb6da7169a
Merge pull request #3389 from orestisf1993/resize-ensure-1px
Ensure containers have a size of at least 1px after resize
2018-09-06 08:41:00 +02:00
Ingo Bürk 9edb7c7a3b
Merge pull request #3390 from orestisf1993/resize-tile
resize set for tiling: default to px when not specified
2018-09-06 08:38:53 +02:00
Ingo Bürk 7257c3b528
Merge pull request #3388 from orestisf1993/cmd_rename_workspace
cmd_rename_workspace: correct order of events
2018-09-06 08:38:03 +02:00
Orestis Floros 64142eeef2
resize set for tiling: default to px when not specified 2018-09-06 05:58:51 +03:00
Orestis Floros 23c1c13d34
Ensure containers have a size of at least 1px after resize
Fixes #2226.
Fixes #2776.
Fixes #3241.
Related to #3194.
2018-09-06 04:56:31 +03:00
Orestis Floros 6846ac98c0
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.
2018-09-06 03:42:07 +03:00
Orestis Floros 7c3c50c5cc
Improve comment from #3245 2018-09-06 03:42:06 +03:00
Michael Stapelberg 09683d21a9
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.
2018-08-31 08:59:08 -06:00
Ingo Bürk 9595263142
Merge pull request #3376 from orestisf1993/floating-disable-scratchpad
Don't disable floating in internal workspaces
2018-08-28 13:30:57 +02:00
Orestis Floros 9718e38a7a
Don't disable floating in internal workspaces 2018-08-28 11:26:20 +03:00
Ingo Bürk f454a5c2dd
Merge pull request #3375 from orestisf1993/ipc_client_timeout
ipc_client_timeout: Fix build when not on linux
2018-08-28 10:20:45 +02:00
Orestis Floros 37b879f4ad
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
2018-08-27 22:21:59 +03:00
Ingo Bürk 08a53611f9
Merge pull request #3374 from orestisf1993/startup-notification
Support startup-notification in i3-nagbar & i3-config-wizard
2018-08-27 11:19:26 +02:00
Orestis Floros bf1cb39b4b
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
4cba9fcbda/etc/config (L150)
2. i3-config-wizard
4cba9fcbda/etc/config (L194)

A user that opens i3 for the first time will be greeted with a "loading"
cursor because of i3-config-wizard.
2018-08-25 14:54:16 +03:00
Orestis Floros a8b90317a0
i3-config-wizard: fix small memleak 2018-08-25 14:54:16 +03:00
Ingo Bürk 4cba9fcbda
Merge pull request #3368 from orestisf1993/render_root
(floating) global fullscreen bugs & others
2018-08-24 09:49:41 +02:00
Ingo Bürk 9a53d65e18
Merge pull request #3372 from orestisf1993/direction
Resize tile px
2018-08-24 09:43:20 +02:00
Orestis Floros 096cff0aad
Make resize set ppt more accurate
See the testcase for the usecase.
2018-08-24 04:13:25 +03:00