Commit Graph

6799 Commits

Author SHA1 Message Date
Ingo Bürk 1a04608796 Send success response for nop. (#3113)
fixes #3112
2018-01-06 23:24:33 +01:00
livanh c0378f737b Improve resize_find_tiling_participants() and simplify cmd_resize_tiling_width_height() (#3111) 2018-01-06 17:59:27 +01:00
Ingo Bürk 2f29fce801
Merge pull request #3110 from DikiCook/config
Add comment $mod+r in back to normal when resize window
2018-01-05 18:43:51 +01:00
Diki Ananta c2483e415c config: add comment $mod+r in back to normal when resize window 2018-01-05 07:14:57 +07:00
Ingo Bürk 59e2b7d48e
Merge pull request #3101 from tpraxl/feature/workspace-variables
Add workspace vars to support DRY when customizing
2018-01-02 09:34:54 +01:00
Orestis Floros 2b5b6330dc Add testcases for focus_follows_mouse 2017-12-31 14:47:48 +02:00
Orestis Floros e0f1579669 cmd_move_con_to_workspace_number: rename workspace->ws
For consistency with other cmd_move_con_to_workspace* functions.
2017-12-27 20:56:37 +02:00
Orestis Floros a2e9b1461f Reduce repetition in cmd_move_con_to_workspace* 2017-12-27 20:55:22 +02:00
Ingo Bürk 0af1edd19a
Merge pull request #3105 from clonejo/feat/pango-markup
Docs: state that pango markup in i3bar requires the use of a pango font.
2017-12-27 18:22:32 +01:00
clonejo eb679bfabd Docs: state that pango markup requires the use of a pango font. 2017-12-27 17:41:55 +01:00
Johannes Lange dc6a099bed fixing uninitialized warnings in testcases 2017-12-27 09:24:35 +01:00
Johannes Lange 80ea18624a fixing redeclaration warnings in testcases 2017-12-27 09:24:34 +01:00
Johannes Lange 8f30a04425 tiling resize: remove minimum size (was 5%)
fixes #3071
2017-12-26 12:02:00 +01:00
Thomas Praxl 941fe9ab4f Shorten comment for workspace variables
The old comments gave the impression that you had to define workspace names upfront, which is not true. This also keeps the overall config as brief as possible.
2017-12-26 11:29:42 +01:00
Ingo Bürk 320246ab47
Merge pull request #3100 from jolange/fix3086
free last_motion_notify before returning
2017-12-25 09:52:09 +01:00
Johannes Lange 0b25259370 free last_motion_notify before returning
fixes #3086
2017-12-24 09:44:52 +01:00
Thomas Praxl 0600b11d2b Add workspace vars to support DRY when customizing
Relabeling the workspaces required the user to update the labels at least in two places of the i3 config file (switch to workspace + move focused container to workspace) to keep a consistent state.

This got even worse when the user started to reference the workspaces elsewhere, e.g. for assigning containers to specific workspaces.

This change supports the DRY principle for users. Relabeling the workspaces is now merely a matter of changing the respective variable ($ws1, $ws2, … $ws10).
2017-12-23 12:28:03 +01:00
Ingo Bürk 2f1fc7f610
Merge pull request #3095 from pallavagarwal07/next
Add support for relative coordinates in i3bar click events
2017-12-20 18:33:21 +01:00
Pallav Agarwal 161db6f17d Add relative coordinates in JSON for i3bar click events (fixes #2767)
Add support for relative coordinates in i3bar click events

Rename {x,y}_rel to relative_{x,y}

Update i3bar-protocol doc to mention the added fields in click events
2017-12-20 22:51:14 +05:30
Michael Stapelberg eb227c2332
Merge pull request #2969 from orestisf1993/issue-1819
Make 'focus' disable blocking fullscreen windows
2017-12-18 08:54:45 +01:00
Ingo Bürk 36449ba22d
Merge pull request #3079 from orestisf1993/generate-command-parser
generate-command-parser.pl: remove trailing characters
2017-12-12 16:49:48 +01:00
Orestis Floros 2403c43f7b Make 'focus' disable blocking fullscreen windows
The problem here is that con_fullscreen_permits_focusing() does not
check if there is a blocking fullscreen container in the workspace that
the container to be focused belongs. This makes it possible to focus a
container behind a fullscreen window if it's in an unfocused workspace.

This commit introduces a change in the 'focus' command behaviour. When
focusing a container blocked by a fullscreen container, either CF_OUTPUT
or CF_GLOBAL, the blocking container loses its fullscreen mode and the
target container is focused like normal.

This should not affect directional focus commands: left, right, up,
down, parent, child.

Fixes issue #1819.
2017-12-11 19:14:33 +02:00
Orestis Floros 994a479558 userguide: mention <criteria> in focus 2017-12-11 19:14:33 +02:00
Orestis Floros 759e051374 Move is_num_fullscreen to Test.pm 2017-12-11 19:14:33 +02:00
Orestis Floros 2592c63603 Add error reply to cmd_focus_window_mode 2017-12-11 19:14:33 +02:00
Orestis Floros df437aa87e Use con_has_parent in con_fullscreen_permits_focusing 2017-12-11 14:00:14 +02:00
Orestis Floros 5225e34b9d generate-command-parser.pl: remove trailing whitespace 2017-12-11 00:41:52 +02:00
Orestis Floros de3c122337 generate-command-parser.pl: remove trailing comma 2017-12-11 00:41:52 +02:00
Ingo Bürk 57ee66ad25
Merge pull request #3078 from orestisf1993/issue-3075
Fix sticky-related crash (#3075)
2017-12-10 22:02:10 +01:00
Orestis Floros d134745c4f Prevent access of freed workspace in _workspace_show
The bug triggers when _workspace_show calls tree_close_internal and
old == old_focus. Ie, when the old workspace was empty and needs to be
closed but then is accessed as output_push_sticky_windows's argument:
Breakpoint 1, output_push_sticky_windows (to_focus=0x55555589c8a0) at ../../i3/src/output.c:102
102	                    con_move_to_workspace(current, visible_ws, true, false, current != to_focus->parent);
(gdb) print con_exists(to_focus)
$1 = false

The access violation can also be prevented by checking if
con_exists(old_focus) but it shouldn't be necessary: the old_focus
container can only be killed when it is an empty workspace.

With --enable-sanitizers this causes i3 to exit but with
--disable-sanitizers the access violation doesn't reliably cause a crash
and the con_move_to_workspace call continues with:
(gdb) print current != to_focus->parent
$2 = 1

Since current->type is CT_FLOATING_CON and to_focus->type is
CT_WORKSPACE, in this specific case ignore_focus would always be true.
So, in this case, passing NULL instead of old_focus to
output_push_sticky_windows doesn't change the behaviour of i3.

Fixes #3075.
2017-12-10 21:37:43 +02:00
Ingo Bürk 8cbe705674
Merge pull request #3076 from orestisf1993/v3-to-v4-issue
minor V3 to v4 issues
2017-12-09 19:42:30 +01:00
Orestis Floros 1890517f96 migrate_config: scalloc converted config
Prevents a false-positive error eg with config file:
set $mod Mod4
bindsym $mod+h split h
bindsym $mod+v split v

ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set ', ...
ERROR: CONFIG: Line   8:     status_command i3status
ERROR: CONFIG: Line   9: }
ERROR: CONFIG: Line  10: <BE><BE><BE><BE><BE><BE>
2017-12-09 20:07:58 +02:00
Orestis Floros ed22785909 Fix v3 to v4 crash with a variable with longer name than value 2017-12-09 19:50:43 +02:00
Ingo Bürk 9d2d602d60
Merge pull request #3074 from orestisf1993/issue-2921
Fix workspace_show-related issues
2017-12-09 15:52:01 +01:00
Orestis Floros cf28147c5e Show workspace in _tree_next
Fixes a regression introduced by #2980.
2017-12-09 16:39:33 +02:00
Orestis Floros 9ced77384b Remove useless check in _tree_next
con_descend_focused on an empty workspace should return the workspace.
2017-12-09 16:39:33 +02:00
Orestis Floros 87ed8df4fa floating_maybe_reassign_ws: show workspace before focusing
With this change i3 will correctly switch to the focused workspace.
This fixes bug with moving floating windows with 'move <direction>' or by dragging like _NET_CURRENT_DESKTOP not getting updated or 'workspace back_and_forth' not working.

Fixes #2921.
2017-12-09 16:39:33 +02:00
Ingo Bürk 23cfbc54c5
Merge pull request #3073 from veselov/i3-3072
Fixes #3072, Xft.dpi can be floating point
2017-12-09 15:34:13 +01:00
Pawel S. Veselov d2b35388b4 Fixes #3072, Xft.dpi can be floating point 2017-12-09 15:12:25 +01:00
Ingo Bürk 90dd84ee62
Merge pull request #3070 from orestisf1993/issue-3068
Add '--release' flag for bindsym in the bar block
2017-12-08 14:29:17 +01:00
Orestis Floros 315ff17563 Add '--release' flag for bindsym in the bar block
i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE
events. During these button release events, only custom commands are
checked to avoid sending multiple workspace ipc messages.

The way this patch is implemented will allow to assign a custom command
for both the press and release of the same button:
bar {
  ...
  bindsym buttonX exec command1
  bindsym --release buttonX exec command2
}

Fixes #3068.
2017-12-08 12:16:22 +02:00
Ingo Bürk ee0c016091
Merge pull request #3066 from orestisf1993/xvfb-opt
complete-run.pl: accept the xvfb option from command line
2017-12-05 07:29:10 +01:00
Orestis Floros b6bbb91479 complete-run.pl: accept the xvfb option from command line 2017-12-05 00:22:14 +02:00
Ingo Bürk 458e2a2e46
Merge pull request #3022 from orestisf1993/i3bar-leaks
Fix i3bar leaks
2017-12-03 19:51:25 +01:00
Orestis Floros 54c79e4b2f i3bar: free output data structures 2017-12-03 20:25:34 +02:00
Ingo Bürk 730264d9b2
Merge pull request #3065 from orestisf1993/issue-3064
Skip internal workspaces with 'move workspace to output'
2017-12-03 18:46:34 +01:00
Orestis Floros e3f8939a58 Skip internal workspaces with 'move workspace to output'
Fixes #3064.
2017-12-01 17:11:32 +02:00
Ingo Bürk f6f198c3fe
Merge pull request #3058 from d-e-s-o/fix-FREE
do not check for NULL in FREE macro
2017-11-29 08:33:27 +01:00
Daniel Mueller 3e34122de4 Perform proper cleanup for signals with 'Term' action (#3057)
Issue #3049 describes a case where terminating i3 by means of SIGTERM
causes it to leak the runtime directory and all its contents. There are
multiple issues at play: first, any cleanup handlers registered via
atexit are never invoked when a signal terminates the program (see
atexit(3)). Hence, the log SHM log cleanup performed in i3_exit is not
invoked in that case. Second, compared to the shutdown path for the
'exit' command, we do not unlink the UNIX domain socket we create,
causing it to be leaked as well. Third, a handler for SIGTERM is not
registered at all despite handle_signal claiming to be the handler for
all 'Term' signals.
This change addresses all three problems and results in a graceful exit
including cleanup to happen when we receive a signal with the default
action 'Term'. It addresses issue #3049.
2017-11-28 23:29:47 -08:00
Ingo Bürk e4d6458cc3
Merge pull request #3052 from d-e-s-o/remove-magic-numbers
i3bar: replace magic numbers with more meaningful constructs
2017-11-29 08:22:51 +01:00