Commit Graph

6416 Commits

Author SHA1 Message Date
Orestis Floros dc0337d2e5 Reset B_UPON_KEYRELEASE_IGNORE_MODS bindings when switching modes
With example config:
    mode "a_mode" {
        bindcode 27 --release mode "default"
    }
    bindsym $mod+r mode "a_mode"

The first time $mod+r is pressed "a_mode" is activated like normal. When
r (bindcode 27) is pressed to exit the mode:
- On the KeyPress event the corresponding bind->release is correctly
marked as B_UPON_KEYRELEASE_IGNORE_MODS.
- On the KeyRelease event the command 'mode "default"' is executed but
bind->release is still B_UPON_KEYRELEASE_IGNORE_MODS since they are only
reset on KeyPress events.
The second time $mod+r is pressed and "a_mode" is activated and when the
r key is released the 'mode "default"' is executed even though the mods
are not matching since bind->release == B_UPON_KEYRELEASE_IGNORE_MODS.

This still doesn't catch 2 cases:
1. When the order is: press $mod -> press r -> release $mod -> release
    r. Since 'r' is released without any modifiers the binding matches.
2. With:
        mode "resize" {
            bindsym --release r mode "default"
        }
        bindsym r mode "resize"
    This is arguably correct: on the KeyPress event we switch to the mode and
    on the KeyRelease we switch back.
2018-03-20 04:09:34 +02:00
Orestis Floros ff579ef22f Correctly handle bindings for the same mod key with and without --release
Before this commit, get_binding() exited on the first match without
marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS.

Similarly, once it found a --release binding during a KeyPress event it
would stop searching for a matching key press binding.

Example config, placing the --release line first will trigger the second
problem:

# i3 config file (v4)
bindsym Super_L exec notify-send "press"
# or
# bindcode 133 exec notify-send "press"
bindsym --release Super_L exec notify-send "release"
# or
# bindcode --release 133 exec notify-send "release"

Fixes #2733
2018-03-20 04:09:25 +02:00
Orestis Floros 130b3ce3a9 Check for B_UPON_KEYRELEASE_IGNORE_MODS with bindsyms
From 548d74015c50d7fae14bfb8bb1989acde5fc22ae:
> 1. press $mod, press x, release x, release $mod
> 2. press $mod, press x, release $mod, release x

case (2.) didn't work, now it should be fixed.
2018-03-20 04:00:47 +02:00
Orestis Floros b467937808 Fix userguide link
[[move_to_outputs]] doesn't work currently:
https://i3wm.org/docs/userguide.html#move_to_outputs
This does:
https://i3wm.org/docs/userguide.html#_moving_containers_workspaces_to_randr_outputs

This combines a 'BlockId Element' with an 'anchor'. Both should work
now.
2018-03-19 18:30:22 +02:00
Ingo Bürk 670dfa0bba
Merge pull request #3189 from orestisf1993/run_assignments
run_assignments: check for A_COMMAND early
2018-03-19 14:32:54 +01:00
Ingo Bürk b4e24a6d5f
Merge pull request #3188 from orestisf1993/free_ran_assignments
Free ran_assignments
2018-03-19 07:04:45 +01:00
Ingo Bürk b721a40fdb
Merge pull request #3187 from orestisf1993/assign-memleak
Fix memleak: FREE(assign->dest.output)
2018-03-19 07:03:47 +01:00
Orestis Floros 6306acdb65 run_assignments: check for A_COMMAND early 2018-03-19 03:17:32 +02:00
Orestis Floros 98df2e21fa Free ran_assignments
When we run 'reload' all the assignments are freed:
e3e09119bf/src/config.c (L99-L109)

Assignments are saved to each window after they are executed:
e3e09119bf/src/assignments.c (L41-L46)

This means that the pointers stored in window->ran_assignments are
invalid (shouldn't be dangerous currently but could lead to a segfault
if the code is modified) after a 'reload'.
2018-03-19 03:00:35 +02:00
Orestis Floros 1fe4e635b5 Fix memleak: FREE(assign->dest.output) 2018-03-19 02:02:59 +02:00
Ingo Bürk e3e09119bf
Merge pull request #3186 from orestisf1993/i3-msg
i3-msg: only print input + errorposition if they exist
2018-03-18 07:51:50 +01:00
Orestis Floros 124e64767e i3-msg: only print input + errorposition if they exist
Before:
$ i3-msg floating disable, move window to position 100 px 100 px
ERROR: Your command: (null)
ERROR:               (null)
ERROR: Cannot change position of a window/container because it is not floating.
[{"success":true},{"success":false,"error":"Cannot change position of a window/container because it is not floating."}]

After:
$ i3-msg floating disable, move window to position 100 px 100 px
ERROR: Cannot change position of a window/container because it is not floating.
[{"success":true},{"success":false,"error":"Cannot change position of a window/container because it is not floating."}]
2018-03-18 03:38:06 +02:00
Tony Crisci 9cd4b53231 testcases: remove assumption from state atoms test
Remove the assumption that only two atoms can possibly be set in
t/253-multiple-net-wm-state-atoms.t so that the tests will pass when
more atoms are supported that may be set during this test.
2018-03-18 00:11:55 +02:00
Ingo Bürk a9512c6345
Merge pull request #3180 from chrisduerr/next
Add alacritty to `i3-sensible-terminal`
2018-03-17 07:31:48 +01:00
Christian Duerr b266574c30
Add alacritty to i3-sensible-terminal 2018-03-16 22:53:39 +01:00
Michael Stapelberg 8f5c1cb6b8
Merge pull request #2975 from orestisf1993/move-con_focus
Fix move's focus bugs
2018-03-16 09:31:53 +01:00
Orestis Floros 9d22d2efce Reduce repetition in get_binding() 2018-03-16 03:08:47 +02:00
Ingo Bürk 965ef8d33f
Merge pull request #3177 from orestisf1993/trailing
Remove trailing whitespace from Perl scripts
2018-03-15 20:41:47 +01:00
Orestis Floros 3f4268561d Remove trailing whitespace from Perl scripts 2018-03-15 21:33:45 +02:00
Orestis Floros d66fa51f33 Don't call con_focus in tree_move
Fixes:
- Issue where moving an urgent (unfocused) window resets it's urgency
hint.
- Moving an unfocused container to a new parent should not move it to
the top of the focus stack.
2018-03-15 19:57:30 +02:00
Orestis Floros 6222ab1084 Correct insert_con_into's focus handling
Change from always putting con on the head of the new parent. Important
for moving unfocused containers.
2018-03-15 19:49:17 +02:00
Ingo Bürk c1e622be27
Merge pull request #3176 from orestisf1993/dump-asy-marks
dump-asy.pl: Add marks
2018-03-14 14:24:00 +01:00
Ingo Bürk 6cc3a2bfe8
Merge pull request #3175 from orestisf1993/dump-asy
dump-asy.pl: Add options
2018-03-14 14:23:39 +01:00
Orestis Floros 774a61b47e dump-asy.pl: Add marks 2018-03-14 14:59:26 +02:00
Orestis Floros dda340cbc6 dump-asy.pl: Add --save option 2018-03-14 14:43:12 +02:00
Orestis Floros 883cf4041d dump-asy.pl: Add --gv option 2018-03-14 14:32:16 +02:00
Orestis Floros 9521f69e11 dump-asy.pl: Add POD usage 2018-03-14 12:12:44 +02:00
Ingo Bürk c0bcd37153
Merge pull request #3172 from klorax/patch-1
Docs [#3164]: Clarification about X resource value
2018-03-11 19:54:39 +01:00
Klorax 9017a17e39
Docs [#3164]: Clarification about X resource value
Clarification about X resource value: they are loaded verbatim and must therefore be in the format that i3 uses.
Solves #3164.
2018-03-11 18:04:32 +01:00
Ingo Bürk dfc330fcb8
Merge pull request #3167 from hwangcc23/fix-3163
Add strip_workspace_name
2018-03-11 16:33:10 +01:00
hwangcc23 2269b2e795 Add strip_workspace_name
See the issue #3163 (https://github.com/i3/i3/issues/3163).

Add strip_workspace_name to strip off the workspace name.
2018-03-11 12:17:42 +08:00
Ingo Bürk 69eec7e5b2 Refocus focused window for FOCUS_IN events on the root window. (#3097)
This deals with (admittedly somewhat misbehaving) clients which
use XSetInputFocus to take focus, but then don't properly restore
focus. This has been observed with TK apps, but also, e.g., Steam.

fixes #2722
fixes #3096
2018-03-10 19:18:44 +01:00
Ingo Bürk ec5a048792
Merge pull request #3166 from Hritik14/next
Fixed typo
2018-03-10 19:11:55 +01:00
Ingo Bürk eafe55a9d8
Merge pull request #3168 from stapelberg/release-fixes
Release fixes
2018-03-10 19:08:19 +01:00
Michael Stapelberg a05ba370cd update release.sh after release 2018-03-10 18:53:20 +01:00
Michael Stapelberg c74dd61f59 release: new-enough dput no longer needs an explicit file name 2018-03-10 18:53:04 +01:00
Michael Stapelberg a07980f70b release: also build a Debian source-only upload 2018-03-10 18:52:50 +01:00
Michael Stapelberg 8513107f09 release: disable git’s rename protection (prevented merging) 2018-03-10 18:52:27 +01:00
Michael Stapelberg e6b2fefe26 debian: update changelog 2018-03-10 18:35:11 +01:00
Michael Stapelberg b96529503f Merge branch 'release-4.15' 2018-03-10 18:29:21 +01:00
Michael Stapelberg 5a32c1282a Set non-git version to 4.15-non-git. 2018-03-10 18:29:21 +01:00
Michael Stapelberg c15a9af3d5 release i3 4.15 2018-03-10 18:29:14 +01:00
Hritik Vijay 8ee4a4a3e1 Fixed typo 2018-03-10 02:38:47 +05:30
Ingo Bürk 29dc14dda3
Merge pull request #3165 from stapelberg/nagbar
Bugfix: ignore ConfigureNotify with width == 0 || height == 0
2018-03-09 08:40:19 +01:00
Michael Stapelberg 021d40f666 Bugfix: ignore ConfigureNotify with width == 0 || height == 0
fixes #3132
2018-03-09 08:25:07 +01:00
Ingo Bürk 4b4fba0e74
Merge pull request #3087 from orestisf1993/focus_order
Fix focus order issues when encapsulating workspaces
2018-02-27 07:59:37 +01:00
Orestis Floros cb73fd5e31 Fix focus order issues when encapsulating workspaces
See new tests for an explanation of the problem.
2018-02-26 23:08:57 +02:00
Orestis Floros dc2363a665 Introduce *focus_order functions 2018-02-26 23:06:04 +02:00
Ingo Bürk 0ee3ca01b7
Merge pull request #3153 from orestisf1993/issue-2990
Don't raise floating windows when workspace is shown
2018-02-26 21:50:59 +01:00
Orestis Floros 60200b1d3c Don't raise floating windows when workspace is shown
From comment:
https://github.com/i3/i3/issues/2990#issuecomment-368345169

To easily reproduce:
1. Open 2 floating windows
2. Focus (with `focus_follows_mouse`) the one behind
3. Move the mouse to the other workspace
4. Move the mouse inside the previous workspace (without it even
touching a window)
2018-02-26 03:26:05 +02:00