Commit Graph

7288 Commits

Author SHA1 Message Date
Orestis Floros
34ef7f8c33
tests: Extract focused_output in library 2021-11-05 18:33:14 +01:00
Orestis Floros
bc4f35a6bb
Extract common functions out of cmd_move_con_to_output 2021-11-05 18:33:14 +01:00
Ingo Bürk
20d0591e77
Merge pull request #4604 from orestisfl/fix-focus-warp
Fix focus issue when moving windows across outputs
2021-11-05 15:32:07 +01:00
Orestis Floros
117fb13177
Merge pull request #4650 from orestisfl/focused_tab_title
Add title tab color
2021-11-05 15:24:25 +01:00
Anton Älgmyr
863a9eada4
Fix focus issue when moving windows across outputs
Fixes #3518

This fix avoids the issue of consuming our own warp events by never
calling warp on the wrong container.

Tried to add a test but it also succeeds with version before patch,
see #4604 for discussion

Co-Authored-By: Orestis <orestisflo@gmail.com>
2021-11-05 15:21:59 +01:00
Orestis Floros
f36050b303
Add title tab color
Fixes #4575
2021-11-05 15:19:18 +01:00
Orestis Floros
3c81e8ddaa
Merge pull request #4610 from orestisfl/release-notes-next
Keep each release note in a single file
2021-11-05 10:36:24 +01:00
Orestis Floros
38cf8a21ef
Update release notes
https://github.com/i3/i3/pull/4638
https://github.com/i3/i3/pull/4647
2021-11-05 10:13:30 +01:00
Orestis Floros
c083e023b6
Keep each release note in a single file
To avoid annoying merge conflicts.

Perl script is provided for convenience and simple format checking in
PRs.
2021-11-05 10:13:22 +01:00
Orestis Floros
3e0fc25b6b
Merge pull request #4649 from orestisfl/fix-errno
Fix compilation error on debian
2021-11-04 19:31:44 +01:00
Orestis Floros
ce0d08cc6d
Fix compilation error on debian 2021-11-04 19:27:40 +01:00
Uli Schlachter
445cea8e3a
Do not replace existing IPC socket (#4638)
Imagine you are a happy i3 user and want to also write patches for i3.
You use "Xephyr :1" to get another X11 server and then start your newly
build i3 in it with "DISPLAY=:1 ./i3". You test your changes and
everything seems fine. You are happy. Later that day, you try to log
out, but the $mod+Shift+e key binding from the default config no longer
works. i3-msg cannot connect to the IPC socket because "No such file or
directory". What is going on?

The problem boils down to $I3SOCK having something like two meanings.
When i3 starts, it sets the environment variable $I3SOCK to the path of
its IPC socket. That way, any process started from i3 inherits this and
i3-msg knows how to talk to i3. However, when this variable is already
set when i3 starts, then i3 will replace the existing socket. Thus, in
the earlier experiments, the "separate i3" that was used for
experimenting stole the "main i3"'s socket and replaced it with its own.
When it exited, it deleted that socket.

This commit adds half a work around to this problem: When creating the
IPC socket, i3 will now first try to connect() to the socket. If this
succeeds, it will complain and refuse to use this socket. If the
connect() call fails, it will proceed as usual and create the socket.

Note that trying to connect() to a socket that no process listens on
will fail. Thus, this new code only really "triggers" when some process
is actively listening on this socket and accepting connections.

Example output for when the socket is already in use:

$ I3SOCK=/tmp/sdfdsf DISPLAY=:2 ./i3
31.10.2021 17:03:55 - [libi3] ERROR: Refusing to create UNIX socket at /tmp/sdfdsf: Socket is already in use
31.10.2021 17:03:55 - ERROR: Could not create the IPC socket, IPC disabled

This commit sadly only provides part of the solution. i3 will still
delete the socket when shutting down, even if it failed to create the
IPC socket. Thus, the ipc socket will still break, but now only later.
This will be fixed separately.

First-step-towards-fixing: https://github.com/i3/i3/issues/4381
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-11-04 17:22:22 +01:00
Michael Stapelberg
53f52beb09 Update debian/changelog 2021-11-03 09:23:23 +01:00
Michael Stapelberg
f97268dbd8 Merge branch 'stable' into next 2021-11-03 09:23:23 +01:00
Michael Stapelberg
d83940a8fc Merge branch 'release-4.20.1' 2021-11-03 09:23:23 +01:00
Michael Stapelberg
63aec362c9 Restore non-git version suffix 2021-11-03 09:23:23 +01:00
Michael Stapelberg
b952e74145 release i3 4.20.1 2021-11-03 09:23:07 +01:00
Michael Stapelberg
6fe33394e1 post-release release.sh changes 2021-11-03 09:14:58 +01:00
Baptiste Daroussin
c6ea9bbace portability: use getcwd() instead of get_current_dir_name() (#4645) 2021-11-03 09:03:33 +01:00
Baptiste Daroussin
058ebb0d42 portability: add missing headers
libi3.h defins a macors with the default modes to create a directory.
Those modes are defined in sys/stat.h, so include the necessary header
2021-11-03 09:03:28 +01:00
lycurgus
884717489f Correct short form of raw option in i3-msg manpage 2021-11-03 09:03:14 +01:00
Jakob Haufe
b895d9d3cc Extend title length for xmlto
man.th.title.max.length defaults to 20 which leads to a broken .TH line
for i3-migrate-config-to-v4.1:

.TH "I3\-MIGRATE\-CONFIG\" "1" "02/01/2021" "i3 4\&.19\&.1" "i3 Manual"
2021-11-03 09:03:09 +01:00
rvalieris
39ff5699d6 check for both arguments NULL on strings_differ 2021-11-03 09:03:03 +01:00
Orestis Floros
ecc4f91fb4
Merge pull request #4647 from psychon/refuse-start-without-ipc-socket
Refuse to start without IPC socket
2021-11-02 23:13:52 +01:00
Uli Schlachter
03a0375e7f Refuse to start without IPC socket
This change was (basically) suggested by @orestisfl in
https://github.com/i3/i3/pull/4638#issuecomment-958093518

Testing done:

$ I3SOCK=/dev/null DISPLAY=:2 LC_ALL=C build/i3
bind(): Address already in use
i3: Could not create the IPC socket: /dev/null

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-11-02 21:08:42 +01:00
Baptiste Daroussin
aceb36ae60
portability: use getcwd() instead of get_current_dir_name() (#4645) 2021-11-02 20:14:24 +01:00
Orestis Floros
e4d3ec9217
Merge pull request #4644 from bapt/portability-nits
portability: add missing headers
2021-11-02 19:50:58 +01:00
Baptiste Daroussin
e4a3f6e4cd portability: add missing headers
libi3.h defins a macors with the default modes to create a directory.
Those modes are defined in sys/stat.h, so include the necessary header
2021-11-02 10:43:27 +01:00
Orestis Floros
40b0c8e5b8
Merge pull request #4618 from Jonta/patch-3
Docs: Testsuite: Grammar
2021-11-01 21:42:49 +01:00
Orestis Floros
b0632bddfc
Merge pull request #4637 from lycurgus/patch-1
Correct short form of raw option in i3-msg manpage
2021-10-31 09:36:30 +01:00
lycurgus
8e46943985
Correct short form of raw option in i3-msg manpage 2021-10-31 19:01:32 +11:00
Ingo Bürk
36f9f86714
Merge pull request #4629 from sur5r/xmlto-titlelength
Extend title length for xmlto
2021-10-28 08:40:08 +02:00
Jakob Haufe
a352cecc6a
Extend title length for xmlto
man.th.title.max.length defaults to 20 which leads to a broken .TH line
for i3-migrate-config-to-v4.1:

.TH "I3\-MIGRATE\-CONFIG\" "1" "02/01/2021" "i3 4\&.19\&.1" "i3 Manual"
2021-10-27 19:15:01 +00:00
Jonta
9cc9cc2be0
Docs: Testsuite: Grammar
Incorporating orestisfl's suggestion, and expanding a little
2021-10-24 17:38:14 +02:00
Orestis Floros
b7af69cba8
Merge pull request #4617 from rvalieris/fix
check for both arguments NULL on strings_differ
2021-10-22 17:40:27 +02:00
Jonta
19252515bc
Docs: Testsuite: Grammar 2021-10-22 14:21:16 +02:00
rvalieris
64021b6143 check for both arguments NULL on strings_differ 2021-10-22 07:51:07 -03:00
Orestis Floros
e938cae8a0
Merge pull request #4609 from stapelberg/post-release
post-release release.sh changes
2021-10-19 20:05:27 +02:00
Michael Stapelberg
93e8ccd792 post-release release.sh changes 2021-10-19 18:16:34 +02:00
Michael Stapelberg
46f4fe4ecc debian: update changelog 2021-10-19 08:45:28 +02:00
Michael Stapelberg
d854dc597b Update debian/changelog 2021-10-19 08:38:14 +02:00
Michael Stapelberg
1d05918961 Merge branch 'release-4.20' 2021-10-19 08:38:14 +02:00
Michael Stapelberg
533b76378a Merge branch 'next' into stable 2021-10-19 08:38:14 +02:00
Michael Stapelberg
2472f8b8b4 Restore non-git version suffix 2021-10-19 08:38:14 +02:00
Michael Stapelberg
d216a5c9d3 release i3 4.20 2021-10-19 08:37:58 +02:00
Ingo Bürk
e05af2650e
Merge pull request #4599 from stapelberg/docs-release
Docs and release notes prep for the next release
2021-10-18 08:10:30 +02:00
Michael Stapelberg
b37c3e3d25 release notes: plug headline features, order and clarify changelog 2021-10-17 20:01:54 +02:00
Michael Stapelberg
b04f206e39 userguide: use “all” criterion in title_window_icon examples 2021-10-17 20:01:41 +02:00
Orestis Floros
ab389e1d76
Merge pull request #4565 from stapelberg/skip
i3-dmenu-desktop: ignore duplicate files and directories
2021-10-07 23:38:47 +02:00
Michael Stapelberg
25bf911537 i3-dmenu-desktop: ignore duplicate files and directories
This is required when e.g. mpv is installed in the NixOS global system
environment *and* in the user environment.

Standalone reproducer:

mkdir -p test1/share/applications test2/share
ln -svf /usr/share/applications/i3.desktop test1/share/applications
ln -svf $PWD/test1/share/applications test2/share
export XDG_DATA_DIRS='test1/share:test2/share'
i3-dmenu-desktop

fixes #4522
2021-10-07 23:22:23 +02:00