Commit Graph

2992 Commits

Author SHA1 Message Date
2eac53fada atoms: Properly declare as global variables
See #3914
2020-02-01 17:34:01 +01:00
d11e862919 Delete duplicate definition of ewmh_window
See #3914
2020-02-01 17:32:53 +01:00
110bdcbee5 Merge pull request #3905 from Airblader/bug-3903
Respect match criteria for exec command
2020-01-16 22:19:25 +01:00
f002584509 Respect match criteria for exec command
We currently do not evaluate match criteria for the exec command
since generally executing the same command multiple times is
unlikely to make sense.

However, it does make sense when the match is empty and this should
prevent the command from running, which currently does not happen.

For consisteny we execute the command as many times as there are
matched criteria, but print a warning if it matches more than one
container.

fixes #3903
2020-01-16 22:07:37 +01:00
0ed94fc788 Use EXIT_SUCCESS/FAILURE instead of 0/1 2020-01-16 09:27:05 +01:00
f7aee6b908 Exit with success on -h 2020-01-16 09:21:16 +01:00
5835bbc385 Added workspace ID in GET_WORKSPACES response. 2020-01-08 09:07:53 +01:00
d341b91b0a Merge pull request #3824 from orestisfl/ac_replace_funcs
Use AC_REPLACE_FUNCS
2019-12-25 12:27:21 +01:00
8fdc38d25f Merge pull request #3797 from acheronfail/feat/add-window-type-ipc
feat: add window_type to ipc response
2019-11-29 08:16:57 +01:00
17d0cd7034 Remove various unused parameters 2019-10-20 16:14:20 +03:00
812507c4a1 remanage_window: avoid crash when nc->window == NULL
Temporary solution until we find the root cause. Not that it is a bad
idea to check for NULL either way.

Related to #3731
2019-10-18 11:58:08 +03:00
6011e245e9 Merge pull request #3835 from orestisfl/tree_flatten_crash
Fix crash with moving container that is to be flattened
2019-10-18 09:24:32 +02:00
95d4ce3ed6 scratchpad_move: un-fullscreen correct container
Fixes https://github.com/i3/i3/issues/2857#issuecomment-496264445
2019-10-17 18:14:21 +03:00
9138bb37f1 Merge pull request #3834 from Airblader/bug-3819
Reparent windows to their current position on unmanage
2019-10-16 10:42:35 +03:00
9118ee6029 Merge pull request #3833 from orestisfl/move-to-position+scratchpad
Do not show scratchpad windows after 'move to position'
2019-10-16 09:06:05 +02:00
359d75cd3c Fix crash with moving container that is to be flattened
Same can happen with move_to_output_directed but it is not so easy to
write a test about it.

Fixes #3831
2019-10-16 01:32:05 +03:00
1b3d8650a7 Reparent windows to their current position on unmanage
When unmanaging a window we need to reparent it back to the root
window. With this patch we do so at the current position of the
container such that we don't throw away the geometry position.

This fixes cases where clients withdraw a window and reparent it
later on, expecting to keep the same geometry (in particular dock
clients) but then end up on a wrong output.

fixes #3819
2019-10-15 22:32:48 +02:00
b48ff2c5ec Do not show scratchpad windows after 'move to position'
Fixes #3832
2019-10-15 18:40:59 +03:00
cb9620c60a Merge pull request #3407 from orestisfl/tree_next
tree_next refactor & enhancements
2019-10-15 13:47:24 +02:00
2821270949 _con_move_to_con: focus_next only if in different workspaces 2019-10-14 15:38:44 +03:00
24a58d2952 Implement focus_wrapping workspace
I had a dilemma about the behaviour here:
1. Prohibit focus leaving the workspace in any case unless if
get_tree_next's initial argument is a workspace. This is what this
commit does (also i3-cycle).
2. Leave the workspace if no warp is possible (eg workspace with single
container or `focus right` with `V[a b c*]`).

Fixes #2180
2019-10-14 13:02:33 +03:00
bbc4c99c72 Refactor tree_next
- Makes `tree_next` not recursive.
- Adds `focus next|prev [sibling]` command. See (1.) and (2.) in
https://github.com/i3/i3/issues/2587#issuecomment-378505551 (Issue also
requests move command, not implemented here).
- Directional focus command now supports command criteria.

Wrapping is not implemented inside a floating container. This was also
true before the refactor so I am not changing it here.
2019-10-14 03:31:24 +03:00
f402f45702 Introduce CMD_FOCUS_WARN_CHILDREN 2019-10-14 02:38:53 +03:00
1e8e4d3e7f Introduce direction / orientation / position conversion functions 2019-10-14 02:38:53 +03:00
e5c430e419 tree_move: Use direction_t 2019-10-14 02:31:11 +03:00
70c850ac13 Remove memmem implementation
Not used after 3bd5e6e5c8
2019-10-13 13:10:06 +03:00
736ac40b10 Merge pull request #3814 from orestisfl/net_active_fullscreen
handlers.c: new focus should not end up behind fullscreen
2019-10-09 13:25:38 +02:00
5e1094e994 Merge pull request #3815 from xzfc/3694-baf-rename
When renaming a workspace, update the previous_workspace_name too
2019-10-09 12:38:48 +03:00
ea216f88d8 Merge pull request #3559 from xzfc/3555-drag-threshold
Drag threshold
2019-10-09 12:38:30 +03:00
7e4eb51d23 When renaming a workspace, update the previous_workspace_name too
Fixes #3694
2019-10-09 08:09:24 +00:00
6f82d21c39 handlers.c: new focus should not end up behind fullscreen
This was raised here:
https://www.reddit.com/r/i3wm/comments/df18aa/popup_during_fullscreen_not_behaving_the_way_i/

With this commit, _NET_ACTIVE_WINDOW requests are more similar to
focusing with cmd_focus.
2019-10-09 02:38:40 +03:00
34c217acc8 Introduce con_activate_unblock 2019-10-09 02:31:52 +03:00
beb96ad18c Move container to marked workspace: refine corner case
This commit should fix "move con to parent" trick (see below) in the
case when con->parent->parent is a workspace.

The trick:

    mark _a, focus parent, focus parent, mark _b,
    [con_mark=_a] move window to mark _b, [con_mark=_a] focus

The trick got broken in commit 626af81232
in order to fix an i3 crash (#2003).  Reverting said commit fixes the
trick.  The crash is caused by the fact that empty workspace isn't
considered a split (checked in src/con.c:1324), so the moved window ends
up as a sibling of the target workspace, not as its child.
2019-10-07 18:15:03 +00:00
ba0868e593 Merge pull request #3728 from cdlscpmv/next
Add setting for minimal width of workspace buttons
2019-10-06 00:22:44 +02:00
371dc23101 Tiling resize drag: use threshold 2019-10-03 06:09:57 +00:00
c6b56b09ab Floating move drag: use threshold 2019-10-03 06:09:57 +00:00
551ec20941 drag_pointer(): add use_treshold parameter 2019-10-03 06:09:57 +00:00
2795c51d4b drag_pointer(): drop unused parameter border 2019-10-03 06:05:34 +00:00
454473ac6c Move drag_pointer() to its own source file
Move drag_pointer() and related definitions from floating.c to new file
drag_pointer.c since it's applicable not only to floating windows but
also to resizing of tiled windows.
2019-10-03 06:05:34 +00:00
d22f0342b2 Merge pull request #3809 from xzfc/3606-floating-xterm
Fix regression: floating xterm created partially off screen
2019-10-02 10:52:40 +03:00
67217822b8 do not try to center floating window on itself
Some apps including XTerm start with a WM_CLIENT_LEADER property
containing their own window ID.  Before this commit, i3 tried to center
such windows onto itself and did it wrong since
`leader->rect == {0,0,0,0}` at this moment.

The first affected commit is 128122e766,
however, before it such windows already was misplaced, but got sanitized
afterward [1].

[1]: 8a3ef3a81b/src/floating.c (L329-L335)

Fixes #3606
2019-10-02 04:00:05 +00:00
46cf9fb91b feat: add window_type to ipc response 2019-09-27 15:44:13 +10:00
ff73ddeeee extract_workspace_names_from_bindings: handle optional flags
fixes #3527
2019-09-23 08:21:30 +00:00
a73510026f Remove packed attribute from Rect
Fixes #3785 -- the issue where the Travis build failed because of gcc's
-Werror=address-of-packed-member.

Adds an equality function to avoid relying on memcmp().
2019-09-03 10:43:36 +03:00
efe84764b0 Unset _I3_RESTART_FD after restart (#3775)
Closes #3764
Closes #3765
2019-08-28 08:54:10 +02:00
741e94ae4f cmd_move_to_mark: fix move to scratchpad hidden
This fixes the case where moving a container to a scratchpad hidden
container via a mark would cause the container to be tiling on the
__i3_scratch workspace. This still moves the container to the
__i3_scratch workspace, but properly adds it to the scratchpad so that
it becomes usable instead of requiring criteria to regain access to.
2019-08-21 19:58:49 -04:00
14d2a4c7f6 Correctly select output when pointer query fails 2019-08-13 16:54:55 +03:00
fd7e51927d get_first_output: prefer primary output
Used in two cases:
- When the pointer location can't be found but some initial container
needs to be focused
- When moving disabled outputs
2019-08-13 16:44:45 +03:00
0845d7b264 Remanage window after property updates (like titles) (#3759) 2019-08-13 08:50:48 +02:00
3b88e41dd8 move workspace to output: don’t create duplicatively numbered workspaces (#3746)
fixes #3745
2019-08-08 07:43:01 +02:00