Commit Graph

6812 Commits

Author SHA1 Message Date
Ingo Bürk 4808334b66
Merge pull request #3328 from orestisf1993/next
Fix ISSUE_TEMPLATE typo
2018-07-12 06:27:13 +02:00
Orestis Floros 4cd223f80a
Fix ISSUE_TEMPLATE typo 2018-07-12 03:49:07 +03:00
Orestis Floros d1652ca7cd
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
2018-07-12 03:42:38 +03:00
Felix Buehler 37ea56c221 make format_placeholders case-sensitive 2018-07-10 23:24:50 +02:00
Ingo Bürk b8505bb611
Merge pull request #3324 from orestisf1993/xdg_config
Correct XDG paths precedence for config files
2018-07-10 08:23:32 +02:00
Orestis Floros fd70ea6b31
Correct XDG paths precedence for config files
Fixes #3323
2018-07-10 05:04:34 +03:00
Orestis Floros d525eb80ae
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.
2018-06-27 14:56:50 +03:00
Orestis Floros 1d5b43c18f
Move get_output_for_workspace() to i3test 2018-06-27 14:56:50 +03:00
Orestis Floros bc439de755
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().
2018-06-27 14:56:31 +03:00
Ingo Bürk 6339427f01
Merge pull request #3179 from orestisf1993/issue-2733
Correctly handle bindings for the same key with and without --release
2018-06-22 14:39:02 +02:00
Ingo Bürk d8bb8273da
Merge pull request #3313 from czak/fix-border-artifacts
Border artifacts when moving window
2018-06-22 13:48:15 +02:00
Łukasz Adamczak 606050a700 Consider rect changed when its position changes 2018-06-22 12:34:11 +02:00
Ingo Bürk 6c34063f95
Merge pull request #3309 from orestisf1993/detectable-autorepeat
Enable detectable autorepeat
2018-06-20 08:38:46 +02:00
Ingo Bürk 8bd31842e1
Merge pull request #3310 from KJoke70/patch-1
Update i3-msg.man: added get_config and send_tick
2018-06-15 14:55:49 +02:00
Martin 5debba0d1c
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).
2018-06-15 14:37:14 +02:00
Orestis Floros b87bc70cd6
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:
6f2424e901

Fixes #3306
2018-06-15 13:56:31 +03:00
Ingo Bürk 997459a1db
Merge pull request #3307 from orestisf1993/link
Fix link
2018-06-07 22:52:05 +02:00
Orestis Floros 5ab8c766c4
Fix link
Equivalent from the same version:
https://cgit.freedesktop.org/xorg/xserver/tree/xkb/xkbEvents.c?h=xorg-server-1.17.2#n927
2018-06-07 23:07:16 +03:00
Ingo Bürk 00a8a91c00
Merge pull request #3303 from orestisf1993/back_and_forth
docs: link workspace_auto_back_and_forth from workspace command
2018-06-02 17:17:15 +02:00
Orestis Floros 97536f04df
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.
2018-06-02 18:03:34 +03:00
Ingo Bürk 05a1dc0f6e
Merge pull request #3301 from Streetwalrus/swallow-reframe
Reframe swallowed windows if depth doesn't match
2018-06-02 14:51:18 +02:00
Dan Elkouby 7ac37d8ae4 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
2018-06-02 14:32:47 +03:00
Ingo Bürk 26f50898fd Updated ISSUE_TEMPLATE.md (#3295) 2018-05-20 16:51:26 +02:00
Ingo Bürk ef378d87b6
Merge pull request #3282 from orestisf1993/strncpy-to-memcpy
Replace strncpy call with memcpy when result is not NUL-terminated
2018-05-09 14:34:00 +02:00
Orestis Floros f4981f97bc
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));
>    }
2018-05-08 17:05:46 +03:00
Orestis 1cdb1ab721
Merge pull request #3279 from Streetwalrus/next
Activate the focused child when scrolling over tab/stack decorations
2018-05-05 13:49:13 +03:00
Dan Elkouby 94bc401680 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.
2018-05-05 13:30:48 +03:00
Ingo Bürk d302af2312
Merge pull request #3272 from orestisf1993/fake-outputs
Fix: ConfigureNotify can crash i3 with fake-outputs
2018-05-04 21:58:01 +02:00
Ingo Bürk ae9e2dd86f
Merge pull request #3277 from orestisf1993/resize-set
Resize set improvements
2018-05-04 21:57:12 +02:00
Orestis Floros c50bf50f09
resize set: accept 'width' and 'height' keywords
Fixes #3275
2018-05-02 19:02:38 +03:00
Orestis Floros b901fc9464
resize set for floating: interpret 0 as 'no change'
Fixes #3276
2018-05-02 19:02:38 +03:00
Orestis Floros 64b8b4b766
252-floating-size.t: Reduce code duplication 2018-05-02 18:12:10 +03:00
Ingo Bürk 981e901b79
Merge pull request #3274 from orestisf1993/DEPENDS
Fix DEPENDS table
2018-05-01 19:13:08 +02:00
Orestis Floros 37e3663c77
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
2018-05-01 13:49:55 +03:00
Oliver Graff 252db3b8cf 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
2018-05-01 11:25:13 +03:00
Ingo Bürk e8057b2fbc
Merge pull request #3270 from orestisf1993/ADD_TRANSLATED_KEY
Define ADD_TRANSLATED_KEY once
2018-04-30 10:02:34 +02:00
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