Commit Graph

40 Commits

Author SHA1 Message Date
Michael Stapelberg
ee12c2d1e1 Restore non-git version suffix 2023-10-29 09:58:05 +01:00
Michael Stapelberg
f844de8e66 release i3 4.23 2023-10-29 09:57:51 +01:00
Orestis Floros
ba1f40f45f
i3bar: Add protocol for workspace buttons
Closes #3818 (parent issue)
Fixes #1808
Fixes #2333
Fixes #2617
Fixes #3548
2023-01-22 18:59:58 +01:00
Michael Stapelberg
90d7b9769c meson: specify check: false on run_command
We use run_command for conditionals, meaning meson execution should not stop
when the command returns false. This change keeps our meson setup working
throughout the upcoming change of default behavior (check: true).
2023-01-02 11:36:37 +01:00
Michael Stapelberg
57f984ae67 Restore non-git version suffix 2023-01-02 09:39:12 +01:00
Michael Stapelberg
b85da284a7 release i3 4.22 2023-01-02 09:39:00 +01:00
Michael Stapelberg
2bfa06b7df
meson.build: include new gaps1920.png file in dist tarball (#5242) 2022-11-01 18:26:57 +01:00
Michael Stapelberg
3f400b8ad0 move gaps-specific logic out of con.c and render.c into gaps.c 2022-11-01 17:55:46 +01:00
Michael Stapelberg
9ffcc51183 Restore non-git version suffix 2022-10-24 21:23:06 +02:00
Michael Stapelberg
39afa033e4 release i3 4.21.1 2022-10-24 21:22:50 +02:00
Michael Stapelberg
d7f4707e05 Restore non-git version suffix 2022-09-21 18:26:55 +02:00
Michael Stapelberg
5bc4280a48 release i3 4.21 2022-09-21 18:26:43 +02:00
Orestis Floros
ebcd1d43ea
Allow dragging tiled windows with the mouse. (#3085)
Fixes #2643

Inner drop region behaves like move to mark.
The outer region is close to the edge (currently 30px from the edge).
This will place the container as a sibling in the given direction within
the parent container. If the move direction goes against the orientation
of the parent container, tree_move() is called.

Contributors:
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
See #3085
- Inner drop region behaves like move to mark
- Handle workspaces
- Fix crash when target closes
- Initiate tiling drag from titlebar
- Hide indicator until container is dragged outside of original position
- Calculate outer_threshold using percentages instead of fixed pixel
values
- Emit 'move' event properly
- Don't focus previously unfocused containers
- Use tree_split() on different orientation
- Fix redundant split containers
- DT_PARENT
- Readability & optimizations
- Limit parent threshold by render_deco_height()
- Tests
- Fullscreen container handling
- Initiate drag from title bar
- Fix issue of EnterNotify events still triggering after drag_callback
  is called
- Include decorations for drop target calculation

Co-authored-by: Michael Forster <email@michael-forster.de>
See #2178
- Original implementation of tiling drag + indicator window
> A container can be dragged by the title bar to one of the four sides
> of another container. That container will then be split either
> horizontally or vertically.

Co-authored-by: Tony Crisci <tony@dubstepdish.com>
See #2653
- Original implementation of outer/inner drop region indicator:
> There are two drop regions per direction.
>
> The inner region is closer to the center of the window. Dropping on
> this region will split the target container and put the container
> within the split at the given direction beside the target container.
>
> The outer region is close to the edge (currently 30px from the edge).
> This will place the container as a sibling in the given direction within
> the parent container.
>
> Dropping into the outer region moves the con beside the target. If the
> move direction goes against the orientation of the parent container, the
> con moves out of the row.
- Fix crash: Ignore containers without a managed window (eg i3bar)
2022-07-28 12:03:16 +02:00
Uli Schlachter
6c7efc4de8
Switch from pcre to pcre2 (#4684)
The issue at [0] was opened and I just took a stab at it. I have no
prior experience with pcre and pcre2, but using [1,2] I hacked together
something that seems to work. Next, Michael told me to turn that
patch/hack into a PR, so here we are.

The dependency in meson.build now uses version:'>=10', but this is more
a random guess than actual knowledge.

There was a while loop in regex_new() that dealt with an error when pcre
was not compiled with UTF-8 support. This loop uses a magic constant of
32 for the error code. I just dropped this loop, because I was just
writing a hack and did not intend to turn this into a PR. Also, a quick "grep
32 /usr/include/pcre.h" does not find anything useful, so... *shrug*

pcre_study() was removed without replacement, so the corresponding code
is also simply removed.

Testing done: The test suite passes for me. YMMV.

[0]: https://github.com/i3/i3/issues/4682
[1]: https://www.pcre.org/current/doc/html/pcre2api.html
[2]: https://www.pcre.org/current/doc/html/pcre2demo.html

Signed-off-by: Uli Schlachter <psychon@znc.in>
Fixes: https://github.com/i3/i3/issues/4682
2021-11-29 18:20:54 +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
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
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
Michael Stapelberg
abbf6a85d7
Implement showing window icons in titlebar (#4439)
This feature defaults to off, and can be turned on for individual windows,
or (with for_window) for all new windows. See the userguide change.

This commit is partially based on work by:

• Marius Muja
• mickael9
• Esteve Varela Colominas
• Bernardo Menicagli
2021-06-13 08:35:52 +02:00
Uli Schlachter
60542da091
Do not "set" the wallpaper during startup (#4373)
"Set" the wallpaper during startup only sometimes

Since commit 4f5e0e7, i3 would take a screenshot and set that as the
background pixmap of the root window during startup. This is the easy
part of setting a proper X11 wallpaper.

The code in question was added because something either set the
background pixmap of the root window to NONE or the X11 server was
started with "-background none". This is apparently done by default by
e.g. gdm to avoid some flickering while the X11 server starts up.

This commit makes this code conditional: Only when no wallpaper is
detected is a screenshot taken.

Since I could not find any way to query the background of a window, a
more direct approach is taken to detect this situation: First, we find
some part of the root window that is not currently covered. Then we open
a white window there, close it again and grab a screenshot. If a
wallpaper is set, the X11 server will draw this wallpaper after the
window is closed and something else will be visible in the screenshot.

However, the wallpaper could have a white pixel at the tested position.
Thus, this procedure is repeated with a black window.

Only when this procedure produces two different pixel values is a
screenshot taken and set as the wallpaper.

Fixes: https://github.com/i3/i3/issues/4371
Fixes: https://github.com/i3/i3/issues/2869
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-20 21:37:35 +02:00
j-jzk
fcae64f7fd
Increase test timeout (#4416)
Default of 30 seconds can time-out on slower hardware
2021-04-29 15:59:23 +02:00
Michael Stapelberg
98e0a07f15 Merge branch 'stable' into next 2021-02-27 10:38:13 +01:00
Michael Stapelberg
4ef47087d4 Restore non-git version suffix 2021-02-27 10:38:13 +01:00
Michael Stapelberg
ddebebd26b release i3 4.19.2 2021-02-27 10:37:57 +01:00
Michael Stapelberg
33bbce6c38 Merge branch 'stable' into next 2021-02-01 09:04:01 +01:00
Michael Stapelberg
0fb9123da9 release i3 4.19.1 2021-02-01 09:03:45 +01:00
Michael Stapelberg
131a6158c8 move set_nonblock, create_socket and path_exists to libi3 2021-01-20 21:40:24 +01:00
ajakk
27ff84ff42
Use docdir for all docs when building (#4269) 2020-12-08 08:11:59 +01:00
Dmitri Goutnik
d0067077ed
declare parser generated sources as deps (#4264) 2020-11-21 19:18:24 +01:00
Michael Stapelberg
8ac9a815f3 Restore non-git version suffix 2020-11-15 18:23:15 +01:00
Michael Stapelberg
969e6bc8c4 release i3 4.19 2020-11-15 18:23:00 +01:00
Michael Stapelberg
8a7ac068c8 meson.build: fix typo in summary: docs → mans 2020-10-28 21:34:48 +01:00
Orestis Floros
eaac9125a9
meson: Mark complete-run.pl as executable (#4224)
Fixes problem described in
https://github.com/i3/i3/issues/4086#issuecomment-711774506
2020-10-19 22:10:14 +02:00
Michael Stapelberg
ac5368770e add i3test_pm dependency after all
I suppose the now-conditional docs building had previously pulled in i3test_pm
implicitly.

related to #4086
2020-06-06 14:14:24 +02:00
Michael Stapelberg
bec3887fc8 meson: only install docs/man pages when they exist (release tarball)
related to #4086
2020-05-19 22:28:21 +02:00
Michael Stapelberg
315f646876 meson: install docs from release tarball
related to #4086
2020-05-19 19:36:56 +02:00
Michael Stapelberg
97e477777e meson: install static documentation files
related to #4086
2020-05-19 19:07:48 +02:00
Michael Stapelberg
693eee0c03 meson: make docdir configurable
The debian package wants to install docs to $datadir/doc/i3-wm.

related to #4086
2020-05-19 19:07:45 +02:00
Michael Stapelberg
aba6ec3e52
add meson build files (#4094)
Motivation:

• faster builds (on an Intel Core i9-9900K):
  ( ../configure --disable-sanitizers && make -j8; )
  19,47s user 2,78s system 395% cpu 5,632 total

  ( meson .. -Dmans=true -Ddocs=true -Dprefix=/usr && ninja; )
  38,67s user 3,73s system 1095% cpu 3,871 total

• more approachable build system configuration in the
  python-esque meson domain specific language instead of
  the autotools m4 macro language

• built-in language server support thanks to ninja:
  the required compile_commands.json is built automatically
  and only needs to be linked from the source dir, e.g.:
  ln -s build/compile_commands.json .

Changes:

• the embedded vcs version info format changed from e.g.
  4.18-282-gabe46f69 (2020-05-16, branch "next")
  to:
  4.18-282-gabe46f69
  I think it’s better to lose a little bit of detail for
  the gained cleanliness of using meson’s vcs_tag()

• Drop unused xcb-event dependency.

• We can no longer enable sanitizers and debug options
  based on whether we are in a release or non-release build,
  because our new version logic runs at ninja build time,
  not at meson configure time.

  The new behavior is probably for the better in terms of
  what people expect, and we can make the CI use address sanitizer
  explicitly to ensure it is still exercised.

• We lose the AX_EXTEND_SRCDIR behavior, i.e. including the
  path component of the parent of the source dir in all paths.
  This was a trick we used for easier debugging, so that stack
  traces would contain e.g. ../i3-4.18.1/src/main.c, instead of
  just src/main.c.

  The other mechanism (_i3_version symbol) that we have for including
  the version number in the “backtrace full” (but not merely
  “backtrace”) output of gdb still works.

• Release tarballs now use tar.xz. Why not.

Migration plan

This commit adds the meson build files to the tree, but does not remove
autotools yet. For the development phase, we will keep both build systems
functional (and built on travis).

Then, just before the i3 v4.19 release, we will remove autotools from the tree
and the release tarball will require meson to compile.

This way, we incentivize maintainers to change, while also offering them an easy
way out (if desired) by reverting the most recent commit. In practice, switching
a distribution package from autotools to meson should only be a few line change,
easier than applying the provided patch :). Take a look at the debian/ changes
in this commit for an example.

meson is broadly available everywhere that i3 is available: Both xorg-server and
systemd gained meson build files in 2017, so we can follow suit:
https://anholt.livejournal.com/52574.html
https://in.waw.pl/~zbyszek/blog/systemd-meson.html

How do I?

For producing a coverage report, enable the b_coverage meson base option
and run ninja coverage-html:
% cd build
% meson .. -Db_coverage=true
% ninja
% ninja test
% ninja coverage-html
See also https://mesonbuild.com/howtox.html#producing-a-coverage-report

For using the address sanitizer, memory sanitizer or undefined behavior
sanitizer, use the b_sanitize meson base option:
% cd build
% meson .. -Db_sanitize=address
% ninja
See also https://mesonbuild.com/Builtin-options.html#base-options

related to #4086
2020-05-19 14:45:06 +02:00