Commit Graph

6226 Commits (00a8a91c00e6f0b80b335494b606b2ffa868d1da)

Author SHA1 Message Date
Orestis Floros 4097769105 _workspace_show -> workspace_show
a9b57a44a9 removed the extra parameter of
workspace_show.
2018-03-24 14:26:11 +02:00
Ingo Bürk 83ac1c0e72
Merge pull request #3184 from orestisf1993/issue-1341
floating_enable & floating_maybe_reassign_ws changes
2018-03-23 19:17:12 +01:00
Orestis Floros 8e9b26fc90 floating_maybe_reassign_ws: use get_output_from_rect
This significantly reduces the number of ELOGs while dragging floating
containers. The behaviour is improved since floating containers in the
edge of the screen will still get reassigned to their closest workspace.

For example, consider this setup:
fake-outputs 500x500+0+0,500x500+500+0

Now, open a window in the right output and run:
i3-msg floating enable, move position 0 px 450 px
The window is on the bottom edge of the left workspace but if you run:
i3-msg focus mode_toggle
focus will go to the right workspace since floating_maybe_reassign_ws
didn't change the assigned workspace of the floating container.
2018-03-23 17:42:39 +02:00
Orestis Floros 128122e766 floating_enable: change reassign logic
This allows the floating container's top left corner to be mapped
outside any output as long as they are contained partially by one. This,
for example, will allow:
mpv --geometry +1+1 video.mp4

For windows mapped to (0, 0) see comment in floating.c:270-273:
/* Some clients (like GIMP’s color picker window) get mapped
 * to (0, 0), so we push them to a reasonable position
 * (centered over their leader) */

 The floating_reassign_ws call is removed since we try to place the new
 floating container in the current output:
 /* Sanity check: Are the coordinates on the appropriate output? If not, we
  * need to change them */

Fixes #1341
2018-03-23 17:42:39 +02:00
Orestis Floros 8a3ef3a81b Introduce get_output_from_rect 2018-03-23 17:42:39 +02:00
Orestis Floros e09861f73f contained_by_output: return output and rename to output_containing_rect 2018-03-23 17:40:03 +02:00
Ingo Bürk 8e198a2105
Merge pull request #3195 from orestisf1993/issue-2993
Improve directional moving of fullscreen containers
2018-03-23 14:52:48 +01:00
Ingo Bürk 9f273f3356
Merge pull request #3178 from orestisf1993/pr-2314
Support _NET_WM_STATE_FOCUSED
2018-03-23 14:50:46 +01:00
Orestis Floros 3ccaf11eab Improve directional moving of fullscreen containers
Fixes #2993.
2018-03-23 15:46:40 +02:00
Tony Crisci c42de09b1b Support _NET_WM_STATE_FOCUSED
_NET_WM_STATE_FOCUSED is set on _NET_WM_STATE to indicate that the
window is focused. It must be set when the window is newly focused and
removed once the window no longer has focus.

> _NET_WM_STATE_FOCUSED indicates whether the window's decorations are
> drawn in an active state. Clients MUST regard it as a read-only hint.
> It cannot be set at map time or changed via a _NET_WM_STATE client
> message.

For example, this is used by GTK applications to show the decoration in
an active or inactive state. This change can be tested by opening a GTK
application (like evince), focusing the window and unfocusing the
window, and observing a change in the window decorations.

Fixes #2273
2018-03-23 14:30:57 +02:00
Ingo Bürk 7411dfa5ef
Merge pull request #3185 from orestisf1993/cmd_move_window_to_position
Remove 'method' from cmd_move_window_to_position
2018-03-21 08:38:41 +01:00
Orestis Floros 5e8a3f3f0c cmd_move_window_to_position: improve error message 2018-03-20 16:59:06 +02:00
Orestis Floros 174dc389ff Remove 'method' from cmd_move_window_to_position
For command:
move window to [absolute] position X px Y px
if the optional keyword 'absolute' is provided the end result is the
same even though it is implemented differently. Only difference is that
with absolute the floating window can move completely outside of any
output.

This commit removes the 'method' argument and only keeps the sane
implementation.
2018-03-20 16:59:06 +02:00
Ingo Bürk ddc80ab305
Merge pull request #3191 from orestisf1993/userguide
Fix userguide link
2018-03-20 08:39:23 +01: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
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