]> git.sur5r.net Git - i3/i3/log
i3/i3
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 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 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

6 years agoFix ISSUE_TEMPLATE typo 3328/head
Orestis Floros [Thu, 12 Jul 2018 00:49:07 +0000 (03:49 +0300)]
Fix ISSUE_TEMPLATE typo

6 years agocmd_rename_workspace: always call con_focus 3327/head
Orestis Floros [Wed, 11 Jul 2018 21:12:27 +0000 (00:12 +0300)]
cmd_rename_workspace: always call con_focus

This was introduced in 252db3b8c (#3245). That commit moved the
con_activate line inside the loop, meaning it wouldn't always be called.

When the mouse moved after a rename with focus_follows_mouse enabled,
check_crossing_screen_boundary (src/handlers.c:111) called
con_descend_focused that used the wrong focus order.

I also change con_activate to con_focus since we don't really want to
raise floating containers there.

Fixes #3325

6 years agomake format_placeholders case-sensitive 3319/head
Felix Buehler [Sun, 1 Jul 2018 22:03:13 +0000 (00:03 +0200)]
make format_placeholders case-sensitive

6 years agoMerge pull request #3324 from orestisf1993/xdg_config
Ingo Bürk [Tue, 10 Jul 2018 06:23:32 +0000 (08:23 +0200)]
Merge pull request #3324 from orestisf1993/xdg_config

Correct XDG paths precedence for config files

6 years agoCorrect XDG paths precedence for config files 3324/head
Orestis Floros [Tue, 10 Jul 2018 02:04:34 +0000 (05:04 +0300)]
Correct XDG paths precedence for config files

Fixes #3323

6 years agoUse get_assigned_output for numbers
Orestis Floros [Wed, 28 Mar 2018 01:05:48 +0000 (04:05 +0300)]
Use get_assigned_output for numbers

This prohibits the usage of workspaces assigned to other outputs in
create_workspace_on_output.

Eg, with config:
    workspace 1 output fake-0
    workspace 2 output fake-0
and 2 screens workspace 2 would be used for the second screen even
though it is assigned to the first one.

Also introduces a test for workspace assignments that includes the case
described above and some tests that don't fail in the next branch.

6 years agoMove get_output_for_workspace() to i3test
Orestis Floros [Tue, 27 Mar 2018 22:57:54 +0000 (01:57 +0300)]
Move get_output_for_workspace() to i3test

6 years agoIntroduce get_assigned_output
Orestis Floros [Wed, 28 Mar 2018 00:35:40 +0000 (03:35 +0300)]
Introduce get_assigned_output

This also replaces code in create_workspace_on_output() that is
theoretically more efficient but:
1. It isn't a huge difference since it depends on the number of outputs,
that shouldn't be high.
2. get_assigned_output will be modified and used for #555, then its
logic should be followed in create_workspace_on_output() too.

Another note for create_workspace_on_output: if assigned is not NULL the
condition (assigned != output->con) should never be false, ie if there
is an assigned output to this name, it isn't the current one. This
happens because the current callers check for assignments before calling
create_workspace_on_output().

6 years agoMerge pull request #3179 from orestisf1993/issue-2733
Ingo Bürk [Fri, 22 Jun 2018 12:39:02 +0000 (14:39 +0200)]
Merge pull request #3179 from orestisf1993/issue-2733

Correctly handle bindings for the same key with and without --release

6 years agoMerge pull request #3313 from czak/fix-border-artifacts
Ingo Bürk [Fri, 22 Jun 2018 11:48:15 +0000 (13:48 +0200)]
Merge pull request #3313 from czak/fix-border-artifacts

Border artifacts when moving window

6 years agoConsider rect changed when its position changes 3313/head
Łukasz Adamczak [Fri, 22 Jun 2018 10:34:11 +0000 (12:34 +0200)]
Consider rect changed when its position changes

6 years agoMerge pull request #3309 from orestisf1993/detectable-autorepeat
Ingo Bürk [Wed, 20 Jun 2018 06:38:46 +0000 (08:38 +0200)]
Merge pull request #3309 from orestisf1993/detectable-autorepeat

Enable detectable autorepeat

6 years agoMerge pull request #3310 from KJoke70/patch-1
Ingo Bürk [Fri, 15 Jun 2018 12:55:49 +0000 (14:55 +0200)]
Merge pull request #3310 from KJoke70/patch-1

Update i3-msg.man: added get_config and send_tick

6 years agoUpdate i3-msg.man: added get_config and send_tick 3310/head
Martin [Fri, 15 Jun 2018 12:37:14 +0000 (14:37 +0200)]
Update i3-msg.man: added get_config and send_tick

Added get_config and send_tick which are mentioned [here](https://i3wm.org/docs/ipc.html).

6 years agoEnable detectable autorepeat 3309/head
Orestis Floros [Tue, 12 Jun 2018 20:50:09 +0000 (23:50 +0300)]
Enable detectable autorepeat

https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Detectable_Autorepeat

Detectable autorepeat should only affect --release bindings. Currently,
when a user keeps a key pressed, we get multiple KeyPress and KeyRelease
events. With this change, we still get multiple KeyPress events, which
means that you can still keep a key pressed to repeatedly execute a
normal binding, but only one KeyRelease event when the key is physically
released.

Unfortunately, this change is not currently testable because detectable
autorepeat doesn't seem to work under Xephyr. AwesomeWM experienced the
same problem:
https://github.com/awesomeWM/awesome/commit/6f2424e90170be4acaa1d140f966ab6bb8a4d217

Fixes #3306

6 years agoMerge pull request #3307 from orestisf1993/link
Ingo Bürk [Thu, 7 Jun 2018 20:52:05 +0000 (22:52 +0200)]
Merge pull request #3307 from orestisf1993/link

Fix link

6 years agoFix link 3307/head
Orestis Floros [Thu, 7 Jun 2018 20:07:16 +0000 (23:07 +0300)]
Fix link

Equivalent from the same version:
https://cgit.freedesktop.org/xorg/xserver/tree/xkb/xkbEvents.c?h=xorg-server-1.17.2#n927

6 years agoMerge pull request #3303 from orestisf1993/back_and_forth
Ingo Bürk [Sat, 2 Jun 2018 15:17:15 +0000 (17:17 +0200)]
Merge pull request #3303 from orestisf1993/back_and_forth

docs: link workspace_auto_back_and_forth from workspace command

6 years agodocs: link workspace_auto_back_and_forth from workspace command 3303/head
Orestis Floros [Sat, 2 Jun 2018 14:58:10 +0000 (17:58 +0300)]
docs: link workspace_auto_back_and_forth from workspace command

The current text is confusing. '--no-auto-back-and-forth' doesn't
disable the 'workspace back_and_forth' command, the flag is not even
valid for that command.

6 years agoMerge pull request #3301 from Streetwalrus/swallow-reframe
Ingo Bürk [Sat, 2 Jun 2018 12:51:18 +0000 (14:51 +0200)]
Merge pull request #3301 from Streetwalrus/swallow-reframe

Reframe swallowed windows if depth doesn't match

6 years agoReframe swallowed windows if depth doesn't match 3301/head
Dan Elkouby [Fri, 1 Jun 2018 15:55:35 +0000 (18:55 +0300)]
Reframe swallowed windows if depth doesn't match

X will not allow a window with ParentRelative background to be created
or reparented under a window with mismatching color depth.
Deal with this by destroying the container frame and creating a new one
with the right depth upon swallowing.
Defer destruction of the frame window until after the updated tree has
been rendered to avoid some distracting flickering.

Fixes #3297

6 years agoUpdated ISSUE_TEMPLATE.md (#3295)
Ingo Bürk [Sun, 20 May 2018 14:51:26 +0000 (16:51 +0200)]
Updated ISSUE_TEMPLATE.md (#3295)

6 years agoMerge pull request #3282 from orestisf1993/strncpy-to-memcpy
Ingo Bürk [Wed, 9 May 2018 12:34:00 +0000 (14:34 +0200)]
Merge pull request #3282 from orestisf1993/strncpy-to-memcpy

Replace strncpy call with memcpy when result is not NUL-terminated

6 years agoReplace strncpy call with memcpy when result is not NUL-terminated 3282/head
Orestis Floros [Tue, 8 May 2018 14:05:46 +0000 (17:05 +0300)]
Replace strncpy call with memcpy when result is not NUL-terminated

This fixes a new warning from GCC 8.1, -Wstringop-truncation:
https://gcc.gnu.org/gcc-8/changes.html
https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wstringop-truncation

Replacing with memcpy is what gcc suggests:
> As another example, the following call to strncpy results in copying
> to d just the characters preceding the terminating NUL, without
> appending the NUL to the end. Assuming the result of strncpy is
> necessarily a NUL-terminated string is a common mistake, and so the
> call is diagnosed. To avoid the warning when the result is not
> expected to be NUL-terminated, call memcpy instead.
>    void copy (char *d, const char *s)
>    {
>      strncpy (d, s, strlen (s));
>    }

6 years agoMerge pull request #3279 from Streetwalrus/next
Orestis [Sat, 5 May 2018 10:49:13 +0000 (13:49 +0300)]
Merge pull request #3279 from Streetwalrus/next

Activate the focused child when scrolling over tab/stack decorations

6 years agoActivate the focused child when scrolling over tab/stack decorations 3279/head
Dan Elkouby [Sat, 5 May 2018 10:30:48 +0000 (13:30 +0300)]
Activate the focused child when scrolling over tab/stack decorations

fbce834b introduced a bug where scrolling over the decoration while
another container is focused would not focus the tabbed/stacked
container itself, but would instead move focus through the currently
focused container.

6 years agoMerge pull request #3272 from orestisf1993/fake-outputs
Ingo Bürk [Fri, 4 May 2018 19:58:01 +0000 (21:58 +0200)]
Merge pull request #3272 from orestisf1993/fake-outputs

Fix: ConfigureNotify can crash i3 with fake-outputs

6 years agoMerge pull request #3277 from orestisf1993/resize-set
Ingo Bürk [Fri, 4 May 2018 19:57:12 +0000 (21:57 +0200)]
Merge pull request #3277 from orestisf1993/resize-set

Resize set improvements

6 years agoresize set: accept 'width' and 'height' keywords 3277/head
Orestis Floros [Wed, 2 May 2018 15:59:17 +0000 (18:59 +0300)]
resize set: accept 'width' and 'height' keywords

Fixes #3275

6 years agoresize set for floating: interpret 0 as 'no change'
Orestis Floros [Wed, 2 May 2018 14:43:43 +0000 (17:43 +0300)]
resize set for floating: interpret 0 as 'no change'

Fixes #3276

6 years ago252-floating-size.t: Reduce code duplication
Orestis Floros [Wed, 2 May 2018 15:06:48 +0000 (18:06 +0300)]
252-floating-size.t: Reduce code duplication

6 years agoMerge pull request #3274 from orestisf1993/DEPENDS
Ingo Bürk [Tue, 1 May 2018 17:13:08 +0000 (19:13 +0200)]
Merge pull request #3274 from orestisf1993/DEPENDS

Fix DEPENDS table

6 years agoFix DEPENDS table 3274/head
Orestis Floros [Tue, 1 May 2018 10:49:55 +0000 (13:49 +0300)]
Fix DEPENDS table

- Align right border
- Add a missing '/' in libsn's and util-xrm's link for consistency
- Replace wrong character for border next to pango's min version
- Correct the Pod::Simple link

6 years agoDon't refocus a workspace cleaned up by `workspace_show` during rename
Oliver Graff [Tue, 1 May 2018 08:25:13 +0000 (04:25 -0400)]
Don't refocus a workspace cleaned up by `workspace_show` during rename

When moving a workspace to the current output by way of a rename, if the
current workspace is empty, it will be removed by `workspace_show`.
Attempting to restore focus to this removed workspace causes a crash.
Follow the pattern in workspace.c:996 to only restore the original focus if the
original workspace still exists.

Add a test to ensure that the renamed workspace moves to its appropriate
output and that a crash does not occur.

Fixes #3228

6 years agoMerge pull request #3270 from orestisf1993/ADD_TRANSLATED_KEY
Ingo Bürk [Mon, 30 Apr 2018 08:02:34 +0000 (10:02 +0200)]
Merge pull request #3270 from orestisf1993/ADD_TRANSLATED_KEY

Define ADD_TRANSLATED_KEY once

6 years agoFix: ConfigureNotify can crash i3 with fake-outputs 3272/head
Orestis Floros [Mon, 30 Apr 2018 00:54:38 +0000 (03:54 +0300)]
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.

6 years agosend_tick: set "first" field (#3271)
Orestis [Sat, 28 Apr 2018 12:47:28 +0000 (15:47 +0300)]
send_tick: set "first" field (#3271)

According to the docs, the tick event should return:
    {
     "first": false,
     "payload": "arbitrary string"
    }

6 years agoDefine ADD_TRANSLATED_KEY once 3270/head
Orestis Floros [Sat, 28 Apr 2018 09:21:39 +0000 (12:21 +0300)]
Define ADD_TRANSLATED_KEY once

6 years agoMerge pull request #3268 from orestisf1993/janitorial
Ingo Bürk [Fri, 27 Apr 2018 09:14:45 +0000 (11:14 +0200)]
Merge pull request #3268 from orestisf1993/janitorial

Janitorial

6 years agoMerge pull request #3267 from orestisf1993/cmd_shmlog
Ingo Bürk [Fri, 27 Apr 2018 06:38:29 +0000 (08:38 +0200)]
Merge pull request #3267 from orestisf1993/cmd_shmlog

cmd_shmlog: use parse_long()

6 years agomain.c: remove redundant 'focused' declaration 3268/head
Orestis Floros [Thu, 26 Apr 2018 22:16:42 +0000 (01:16 +0300)]
main.c: remove redundant 'focused' declaration

Previously declared in tree.h:17.

6 years agoFix redundant casts to the same type
Orestis Floros [Thu, 26 Apr 2018 21:08:58 +0000 (00:08 +0300)]
Fix redundant casts to the same type

Found using clang-tidy's google-readability-casting.

6 years agoFix redundant return statements
Orestis Floros [Thu, 26 Apr 2018 20:58:42 +0000 (23:58 +0300)]
Fix redundant return statements

… at the end of a function with a void return type.

Found using clang-tidy's readability-redundant-control-flow.

6 years agocmd_shmlog: use parse_long() 3267/head
Orestis Floros [Thu, 26 Apr 2018 20:47:45 +0000 (23:47 +0300)]
cmd_shmlog: use parse_long()

6 years agoMerge pull request #3261 from orestisf1993/swap-3259
Ingo Bürk [Sun, 22 Apr 2018 14:35:25 +0000 (16:35 +0200)]
Merge pull request #3261 from orestisf1993/swap-3259

Don't call con_fullscreen_permits_focusing with ignore_focus

6 years agoDon't call con_fullscreen_permits_focusing with ignore_focus 3261/head
Orestis Floros [Sun, 22 Apr 2018 00:26:51 +0000 (03:26 +0300)]
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.

6 years agocon_swap: exit when first _con_move_to_con fails
Orestis Floros [Sun, 22 Apr 2018 00:48:50 +0000 (03:48 +0300)]
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.

6 years agoMerge pull request #3230 from hwangcc23/fix-3227
Ingo Bürk [Sat, 21 Apr 2018 15:57:54 +0000 (17:57 +0200)]
Merge pull request #3230 from hwangcc23/fix-3227

Make "scratchpad show" return correct info

6 years agoMerge pull request #3256 from orestisf1993/REQUIRED_OPTION
Ingo Bürk [Sat, 21 Apr 2018 15:56:06 +0000 (17:56 +0200)]
Merge pull request #3256 from orestisf1993/REQUIRED_OPTION

Remove obsolete macro REQUIRED_OPTION

6 years agoMerge pull request #3260 from orestisf1993/cmd_border
Ingo Bürk [Sat, 21 Apr 2018 15:55:51 +0000 (17:55 +0200)]
Merge pull request #3260 from orestisf1993/cmd_border

cmd_border: improve width selection

6 years agocmd_border: improve width selection 3260/head
Orestis Floros [Sat, 21 Apr 2018 12:21:04 +0000 (15:21 +0300)]
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.

6 years agoMake "scratchpad show" return correct info 3230/head
hwangcc23 [Fri, 6 Apr 2018 16:00:38 +0000 (00:00 +0800)]
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.

6 years agoRemove obsolete macro REQUIRED_OPTION 3256/head
Orestis Floros [Fri, 20 Apr 2018 10:00:44 +0000 (13:00 +0300)]
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.

6 years agoMerge pull request #3255 from orestisf1993/FOR_TABLE
Ingo Bürk [Fri, 20 Apr 2018 03:30:51 +0000 (05:30 +0200)]
Merge pull request #3255 from orestisf1993/FOR_TABLE

Remove obsolete macro FOR_TABLE

6 years agoRemove obsolete macro FOR_TABLE 3255/head
Orestis Floros [Fri, 20 Apr 2018 03:13:40 +0000 (06:13 +0300)]
Remove obsolete macro FOR_TABLE

Was added in 38c8541807d50e18bf5ea61995ec6b3ab3e8a068, should have been
removed in c145f7e5297ef06aaf84689762a736d5bc8cbb83.

6 years agoMerge pull request #3253 from stapelberg/sync
Orestis [Thu, 19 Apr 2018 18:20:44 +0000 (21:20 +0300)]
Merge pull request #3253 from stapelberg/sync

Makefile.am: add forgotten include/sync.h

6 years agoMakefile.am: add forgotten include/sync.h 3253/head
Michael Stapelberg [Thu, 19 Apr 2018 18:10:54 +0000 (20:10 +0200)]
Makefile.am: add forgotten include/sync.h

6 years agoMerge pull request #3250 from rtgnx/next
Ingo Bürk [Wed, 18 Apr 2018 20:30:22 +0000 (22:30 +0200)]
Merge pull request #3250 from rtgnx/next

docs/ipc: update tree node with window_properties

6 years agodocs/ipc: update tree node with window_properties 3250/head
Adrian Cybulski [Wed, 18 Apr 2018 00:46:59 +0000 (01:46 +0100)]
docs/ipc: update tree node with window_properties

6 years agoMerge pull request #3246 from orestisf1993/bar-modifier-3234
Ingo Bürk [Tue, 17 Apr 2018 11:13:18 +0000 (13:13 +0200)]
Merge pull request #3246 from orestisf1993/bar-modifier-3234

i3bar: make modifier behave like floating_modifier

6 years agoi3bar: make modifier behave like floating_modifier 3246/head
Orestis Floros [Mon, 16 Apr 2018 18:10:10 +0000 (21:10 +0300)]
i3bar: make modifier behave like floating_modifier

Pressed modifiers are determined like in click.c:handle_button_press.

Fixes #3234.