Commit Graph

6512 Commits

Author SHA1 Message Date
Orestis Floros 1f74f8d2c1
Fix: ConfigureNotify can crash i3 with fake-outputs
handle_screen_change() and handle_configure_notify() call
randr_query_outputs() where root_output is not initialized because
randr_init() is never called when config.fake_outputs is not NULL.
2018-04-30 03:54:38 +03:00
Orestis 6f11b6fa4a send_tick: set "first" field (#3271)
According to the docs, the tick event should return:
    {
     "first": false,
     "payload": "arbitrary string"
    }
2018-04-28 14:47:28 +02:00
Orestis Floros 1681ab4496
Define ADD_TRANSLATED_KEY once 2018-04-28 12:21:39 +03:00
Ingo Bürk 5813525c62
Merge pull request #3268 from orestisf1993/janitorial
Janitorial
2018-04-27 11:14:45 +02:00
Ingo Bürk 19596981a0
Merge pull request #3267 from orestisf1993/cmd_shmlog
cmd_shmlog: use parse_long()
2018-04-27 08:38:29 +02:00
Orestis Floros 16f8fe28d9
main.c: remove redundant 'focused' declaration
Previously declared in tree.h:17.
2018-04-27 01:16:42 +03:00
Orestis Floros 0b5a2092a0
Fix redundant casts to the same type
Found using clang-tidy's google-readability-casting.
2018-04-27 00:09:42 +03:00
Orestis Floros aca7790217
Fix redundant return statements
… at the end of a function with a void return type.

Found using clang-tidy's readability-redundant-control-flow.
2018-04-27 00:09:42 +03:00
Orestis Floros 2f2053284e
cmd_shmlog: use parse_long() 2018-04-26 23:47:45 +03:00
Ingo Bürk 55dd5b8d84
Merge pull request #3261 from orestisf1993/swap-3259
Don't call con_fullscreen_permits_focusing with ignore_focus
2018-04-22 16:35:25 +02:00
Orestis Floros b5f887287a
Don't call con_fullscreen_permits_focusing with ignore_focus
When we don't modify the focus we aren't risking giving focus to a
container behind the current fullscreen one.

_con_move_to_con can with ignore_focus is called through the swap
command or through con_move_to_workspace for floating containers. This
change shouldn't break the expectations of the callers there.

Fixes issue #3259.
2018-04-22 16:56:36 +03:00
Orestis Floros 799e3951a2
con_swap: exit when first _con_move_to_con fails
This is enough to fix the crash discussed in #3259 even though the next
commit can fix it independently. This commit is useful because it
generally makes sense to abort the command when the first call to
_con_move_to_con fails.
2018-04-22 03:48:50 +03:00
Ingo Bürk 5a0f02b7ff
Merge pull request #3230 from hwangcc23/fix-3227
Make "scratchpad show" return correct info
2018-04-21 17:57:54 +02:00
Ingo Bürk 53648511b3
Merge pull request #3256 from orestisf1993/REQUIRED_OPTION
Remove obsolete macro REQUIRED_OPTION
2018-04-21 17:56:06 +02:00
Ingo Bürk 4b95e2c1e0
Merge pull request #3260 from orestisf1993/cmd_border
cmd_border: improve width selection
2018-04-21 17:55:51 +02:00
Orestis Floros bd7a5ee48a
cmd_border: improve width selection
- 'border toggle' now accepts an optional pixel argument which will be
ignored when switching to BS_NONE.
- 'border pixel' now defaults to 1 pixel instead of 2.
- Calling 'border normal' or 'border pixel' will use the configured
default_border_width if one exists. Also applies to floating windows.
2018-04-21 16:50:57 +03:00
hwangcc23 4869becfee Make "scratchpad show" return correct info
Fix the issue #3227(https://github.com/i3/i3/issues/3227).

1).Make cmd_scratchpad_show() use the information coming from scratchpad_show().
2).Add a test case 298-scratchpad-show.t.
2018-04-20 22:30:41 +08:00
Orestis Floros 8fba543719
Remove obsolete macro REQUIRED_OPTION
Was used for the removed option 'terminal' and for 'font'. 'font' is no
longer this aggressive and doesn't use the macro.

Killing i3 when an option is missing would be super backwards
incompatible so I doubt we are going to use this ever again.
2018-04-20 13:05:23 +03:00
Ingo Bürk a40bcef438
Merge pull request #3255 from orestisf1993/FOR_TABLE
Remove obsolete macro FOR_TABLE
2018-04-20 05:30:51 +02:00
Orestis Floros 0254228861
Remove obsolete macro FOR_TABLE
Was added in 38c8541807, should have been
removed in c145f7e529.
2018-04-20 06:13:40 +03:00
Orestis ff543b8b56
Merge pull request #3253 from stapelberg/sync
Makefile.am: add forgotten include/sync.h
2018-04-19 21:20:44 +03:00
Michael Stapelberg 0c3f5f343c Makefile.am: add forgotten include/sync.h 2018-04-19 20:10:54 +02:00
Ingo Bürk 26ba03930f
Merge pull request #3250 from rtgnx/next
docs/ipc: update tree node with window_properties
2018-04-18 22:30:22 +02:00
Adrian Cybulski 7381ae3e20
docs/ipc: update tree node with window_properties 2018-04-18 12:11:07 +01:00
Ingo Bürk 3c66f615e2
Merge pull request #3246 from orestisf1993/bar-modifier-3234
i3bar: make modifier behave like floating_modifier
2018-04-17 13:13:18 +02:00
Orestis Floros fe6b3b7474
i3bar: make modifier behave like floating_modifier
Pressed modifiers are determined like in click.c:handle_button_press.

Fixes #3234.
2018-04-17 02:00:03 +03:00
Ingo Bürk 67a60a9454
Merge pull request #3244 from orestisf1993/issue-3220
i3bar: don't reset verbosity when parsing config values
2018-04-16 11:59:49 +02:00
Orestis Floros 0a72f2d535
i3bar: don't reset verbosity when parsing config values
When i3bar is called with the -V flag but there is no 'verbose yes'
directive in the bar {} config, the verbosity config value is reset.

This will introduce the opposite, negligible issue: you can't disable
i3bar's verbosity by deleting the 'verbose yes' directive in the bar {}
config. To fix this we would need an enum for config.verbose.

Closes #3220.
2018-04-16 01:37:18 +03:00
Ingo Bürk ab47d664c2
Merge pull request #3243 from avindra/next
man: Fix title markers
2018-04-15 21:43:52 +02:00
Takashi Iwai 1f551052de
man: Fix title markers
The title marker lines have to be aligned with the previous lines.
The error was caught by asciidoctor, which tends to be picker than
asciidoc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-15 15:34:40 -04:00
Ingo Bürk 1e5aaa2d10
Merge pull request #3236 from hwangcc23/fix-3220
Add an i3bar flag: --verbose
2018-04-14 14:39:54 +02:00
hwangcc23 e26fd91cf8 Add an i3bar flag: --verbose
Fix the issue #3220. (https://github.com/i3/i3/issues/3220)
2018-04-13 23:09:44 +08:00
Ingo Bürk b688164235
Merge pull request #3231 from orestisf1993/target-is-a-workspace
Fix crash when moving container to marked workspace
2018-04-07 21:13:41 +02:00
Orestis Floros 626af81232
Fix crash when moving container to marked workspace
Was a small typo.

This also has the (positive) side-effect of allowing to move all the
content of a marked workspace next to the target container, see added
tests.
2018-04-07 21:58:55 +03:00
Ingo Bürk a92acadfc0
Merge pull request #3223 from orestisf1993/minor
Minor changes
2018-04-05 10:59:34 +02:00
Orestis bfe047e8bc
Merge pull request #3221 from ograff/issue-3208
Issue #3208
2018-04-05 11:32:38 +03:00
Oliver Graff e4a184e77e
Workspace renaming: Interpret outputs as nondirectional
Currently when renaming outputs, an output assignment of "left" will
cause the workspace to move left. Treat this assignment as a proper name
instead (even though it is unlikely an output will be named "left").

Move logic for determining output to move to out of
`workspace_move_to_output`

Add test for ignoring direcionality during rename.

Fixes #3208.
2018-04-04 13:37:59 -04:00
Orestis Floros 0aa636b207
Prefer compiler warnings to assertions for unhandled switch cases
Using 'default:' cases can hide logical errors which would lead to i3
crashes for users. With this change the compiler will print a warning
when a case is not handled. For example, if I add a new value in the
Font.type enum:
../../i3/libi3/font.c: In function ‘draw_text’:
../../i3/libi3/font.c:378:5: warning: enumeration value ‘NEWFONT’ not handled in switch [-Wswitch]
     switch (savedFont->type) {
     ^~~~~~
2018-04-04 19:20:55 +03:00
Orestis Floros 393412a204
A__NET_REQUEST_FRAME_EXTENTS: use render_font_height() 2018-04-04 18:09:34 +03:00
Ingo Bürk bc760c2036
Merge pull request #3215 from orestisf1993/focus-next-prev
Small window decoration scrolling bugfix
2018-04-03 20:42:00 +02:00
Orestis Floros 96ee336a0b
Use con_orientation instead of ternary operator 2018-04-01 12:18:27 +03:00
Orestis Floros fbce834b20
Window decoration scrolling: don't focus sibling
The current behaviour is buggy in the following layout:
T [ A* V [ B C ] ], where the focus stack in V is B > C.
When the user scrolls down, focus correctly moves to B but if the user
scrolls down again the whole vertical container is focused.

This happens because 'bool scroll_next_possible' is false but
con_activate is called on the tabbed container's sibling - the vertical
container.
2018-04-01 12:18:27 +03:00
Ingo Bürk 666aa9e0dd
Merge pull request #2941 from orestisf1993/issue-2938
Fix focus order in floating_disable & floating_enable for unfocused windows
2018-03-31 20:34:17 +02:00
Ingo Bürk 8a805cdd5c
Merge pull request #3214 from stapelberg/sync
unflake t/525-i3bar-mouse-bindings.t
2018-03-30 21:33:03 +02:00
Michael Stapelberg 874151bb09 t/525-i3bar-mouse-bindings.t: sync with i3 _and_ i3bar
See the comment in the code for rationale.
2018-03-30 21:14:53 +02:00
Michael Stapelberg 145ac532aa i3bar: forward the sync request via IPC, not X11
i3bar’s X11 output is not what our testcases are testing — the state
manipulations which i3bar triggers via IPC messages to i3 are what we are
interested in.
2018-03-30 21:14:51 +02:00
Michael Stapelberg eca8fae2de introduce the sync IPC command
Sending the sync command via IPC ensures pending IPC messages are handled by i3
before the sync response is read. This is rarely useful for direct IPC
connections to i3, but becomes useful when synchronizing with i3bar, which might
have pending IPC messages in response to button clicks.
2018-03-30 21:09:52 +02:00
Michael Stapelberg 725ee3ce62 move i3 sync code into sync_respond (for following commits) 2018-03-30 21:05:32 +02:00
Orestis Floros 791e407fd3
Remove special handling of floating containers in con_next_focused
Explanation for the changed test:
After $third is switched to floating, the test moves focus to $second.
So, the parent of $second (the stacked container) is above $third in the
focus stack and it's children ($first, $second) should get focused
before $second. When $second is switched to floating the correct focus
order for the workspace should be $second->parent (floating con is the
parent) > $first->parent (stacked con) > $third.

Fixes #1975
2018-03-30 18:29:33 +03:00
Orestis Floros 2c6da57e81
Add testcases for toggling floating windows from different workspaces 2018-03-30 18:29:33 +03:00