7427 Commits

Author SHA1 Message Date
Michael Stapelberg
170a322cc2
fix: prevent gaps inside floating split containers (#5276)
Fixes https://github.com/i3/i3/issues/5272
2022-11-12 14:58:13 +01:00
Michael Stapelberg
d130126204
gaps: fix inner gaps for stacked/tabbed containers in splith/splitv (#5275)
Fixes https://github.com/i3/i3/issues/5261
2022-11-12 14:08:13 +01:00
Michael Stapelberg
2b236955bd
use con_border_style() to fix titles in stacked/tabbed containers (#5274)
Previously, the code was directly accessing con->border_style, which circumvents
the special-casing for stacked/tabbed containers that forces window titles even
for title-less containers.

Fixes https://github.com/i3/i3/issues/5269
2022-11-12 12:43:55 +01:00
Orestis Floros
be27a2f50d
userguide: gaps: mention minimum version (#5265) 2022-11-08 17:14:22 +01:00
Michael Stapelberg
804bca3a9a
gaps: make workspace gap assignments order-independent (#5259)
This commit moves subtracting the global gaps from the workspace gaps:
previously, this calculation was done while parsing the configuration
(order dependent), now it’s done at workspace assignment evaluation time.

related to https://github.com/i3/i3/issues/3724

fixes https://github.com/i3/i3/issues/5253
2022-11-07 19:02:57 +01:00
Michael Stapelberg
14795c303c
fix title bar rendering with hide_edge_borders smart (#5260)
related to https://github.com/i3/i3/pull/5245

fixes https://github.com/i3/i3/issues/5254
2022-11-07 19:01:58 +01:00
Michael Stapelberg
e6a28b9475
gaps: change workspace rendering to fix sizes with large outer gaps (#5252)
Currently, containers only consider their neighbors and screen edges.

If >2 containers are in a line, the outer containers adjust from outer gaps, but
the middle containers know nothing of this and only consider the inner gaps.

When the outer gaps differ substantially from the inner gaps, the left-most and
right-most containers are smaller as only they adjust for the larger outer gaps.

This commit changes the rendering: containers are now always inset by their
inner gap settings, and workspace containers is now inset by the outer gap
settings.

The result is that many tiled containers have the same size, and the gaps
overall work as the user might expect them to previous combinations of
outer/inner gap settings still produce the same result, albeit with fixed
outer-most sizes.

fixes https://github.com/Airblader/i3/issues/22

related to https://github.com/i3/i3/issues/3724

Co-authored-by: Cameron Leger <contact@cameronleger.com>
2022-11-06 21:22:21 +01:00
Michael Stapelberg
69e13d7821
Revert "gaps: use logical_px() to work correctly on hi-dpi monitors" (#5251)
This reverts commit 6b658f88be50d5251f85eaf6f838d6c67ebaac95.

The commit was misguided: the pixel values are already run through logical_px()
when parsing the configuration directive or command, so they should not be run
through another logical_px() pass at rendering time.
2022-11-06 19:42:30 +01:00
Michael Stapelberg
2a91514a31 t/548-motif-hints: add missing $x->flush after $x->change_property
I noticed the test was flaky before, possibly this fixes it.

related to #3009
2022-11-06 18:18:23 +01:00
Orestis Floros
9dcf37b428 Fix motif behavior according to spec
See https://linux.die.net/man/3/vendorshell
The important part is:
> MWM_DECOR_ALL
> All decorations *except* those specified by other flag bits that are set
2022-11-06 18:18:23 +01:00
Michael Stapelberg
9e3a9e8225
Allow text drawing to use the alpha channel. (#5246)
This is the last remaining diff from the i3-gaps tree.

related to https://github.com/i3/i3/issues/3724

Tested using the following config with picom:

bar {
	i3bar_command i3bar -t
	status_command i3status
	colors {
		# fully	transparent text on opaque background:
		statusline #ffffff00
		background #000000ff
	}
}
2022-11-06 12:43:37 +01:00
Michael Stapelberg
c8fd8eff21 userguide: document smart_borders 2022-11-06 12:43:01 +01:00
Michael Stapelberg
6fe625f469 userguide: document hide_edge_borders smart_no_gaps
related to https://github.com/i3/i3/issues/3724
2022-11-06 12:43:01 +01:00
Michael Stapelberg
d26ddcbfe5 draw leaf window decorations on ->frame instead of ->parent->frame
related to https://github.com/i3/i3/issues/3724
fixes https://github.com/i3/i3/issues/1966
2022-11-05 15:58:15 +01:00
Michael Stapelberg
6e6af01b7a draw_util: refactor surface_initialized macro into function
This makes it possible to set a breakpoint in gdb on a line in the function and
get a backtrace of un-initialized surface access.
2022-11-05 15:58:15 +01:00
Michael Stapelberg
a59423df81
check-spelling: add another false positive (#5247) 2022-11-05 15:56:36 +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
9c9b110ed1 config.spec: add missing smart_gaps inverse_outer comment 2022-11-01 17:55:46 +01:00
Michael Stapelberg
588cc4c79c refactor cmd_gaps to get rid of all #define
I’m still not 100% happy with how the function turned out (it still does too
many things at once), but this seems like an improvement — at least reading and
navigating the code with LSP now works better.
2022-11-01 17:55:46 +01:00
Michael Stapelberg
4d0323fa9e t/319-gaps.t: also test the gaps command 2022-11-01 17:55:46 +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
a5791b2e64 gaps: allow optional px suffix 2022-11-01 17:55:46 +01:00
Michael Stapelberg
b2c696f680 add basic gaps test 2022-11-01 17:55:46 +01:00
Michael Stapelberg
b82b3e85da userguide: document gaps config directive and gaps command 2022-11-01 17:55:46 +01:00
Michael Stapelberg
6b658f88be gaps: use logical_px() to work correctly on hi-dpi monitors 2022-11-01 17:55:46 +01:00
Michael Stapelberg
5b0f848a40 Fix config.spec comment 2022-11-01 17:55:46 +01:00
Michael Stapelberg
9ac027234b refactor render_con() global parameter into should_inset_con()
This bundles the logic all in one place and thereby makes it a little easier to
understand.
2022-11-01 17:55:46 +01:00
Michael Stapelberg
2fbb36b95f remove dead code: window_rect is overwritten a few lines below 2022-11-01 17:55:46 +01:00
Michael Stapelberg
b825dc124a Merge gaps support as-is
This code was copied over unmodified from https://github.com/Airblader/i3-gaps.

I have split out the differences between i3-gaps and i3 into three areas:
1. Gaps
2. i3bar height
3. rgba colors
2022-11-01 17:55:46 +01:00
Michael Stapelberg
0b89d4b2a7 implement bar { padding } config directive
related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/pull/4288
fixes https://github.com/i3/i3/issues/3721
2022-10-30 22:22:08 +01:00
Michael Stapelberg
327bca26d8 add test for bar { height } 2022-10-30 22:22:08 +01:00
Michael Stapelberg
c45342e74f Merge support for the bar { height } option as-is from i3-gaps
related to https://github.com/i3/i3/issues/3724
related to https://github.com/i3/i3/issues/3721

In a follow-up commit, we can evolve this into the padding directive as
discussed on issue #3721.
2022-10-30 22:22:08 +01:00
Michael Stapelberg
62eb0033b1 docs/userguide: fix asciidoc block syntax (for asciidoctor)
asciidoctor is a bit stricter in what it accepts: the leading and trailing lines
need to have the exact same number of characters, and apparently there needs to
be a blank line after the trailing delimiter line.
2022-10-30 22:22:08 +01:00
Michael Stapelberg
a68eb3a71e delete old release notes 2022-10-30 22:22:08 +01:00
Orestis Floros
080c73d1a4
i3-dmenu-desktop: ignore SIGPIPE when writing to dmenu (#5228)
Fixes broken test
2022-10-29 08:20:09 +02:00
Michael Stapelberg
1f53ae4614 debian: update changelog 2022-10-24 21:33:43 +02:00
Michael Stapelberg
23bc304477 Update debian/changelog 2022-10-24 21:23:07 +02:00
Michael Stapelberg
c6bfd05276 Merge branch 'stable' into next 2022-10-24 21:23:07 +02:00
Michael Stapelberg
85252a3bd1 Merge branch 'release-4.21.1' 2022-10-24 21:23:06 +02: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
3b9d70af41 tiling drag: only start when there are drop targets (#5213)
This prevents potentially confusing drag & drop on fullscreen containers and
only-containers on workspaces.

fixes https://github.com/i3/i3/issues/5184
2022-10-24 21:13:03 +02:00
Michael Stapelberg
c55b52a7cc tiling drag: ignore scratchpad windows when locating drop targets (#5211)
fixes https://github.com/i3/i3/issues/5170
2022-10-24 21:13:00 +02:00
Michael Stapelberg
131b0c5b3d make tiling drag configurable
fixes https://github.com/i3/i3/issues/5155
2022-10-24 21:12:58 +02:00
Michael Stapelberg
aa876585e8 tiling drag: left-click needs threshold, mod-click doesn’t
related to https://github.com/i3/i3/issues/5155
2022-10-24 21:12:56 +02:00
Michael Stapelberg
f1754e12c0 increase drag threshold, run it through logical_px()
related to https://github.com/i3/i3/issues/5155
2022-10-24 21:12:53 +02:00
Michael Stapelberg
e12d2f6a1d tiling drag: fix cursor (wrong argument passed) (#5207)
Currently, the cursor is XCURSOR_CURSOR_TOP_RIGHT_CORNER (== BORDER_TOP),
but the intended cursor was XCURSOR_CURSOR_MOVE.

noticed this as part of https://github.com/i3/i3/issues/5198
2022-10-24 21:12:51 +02:00
Michael Stapelberg
b88ca36a5a tiling drag: allow click immediately, to focus on decoration click (#5206)
With the introduction of tiling drag, i3’s click behavior in window decorations
changed: before tiling drag, in a tabbed or stacked container, a window would be
focused/raised on mouse down. After tiling drag, on mouse up.

This commit sends XCB_ALLOW_REPLAY_POINTER before running the tiling drag code,
thereby restoring the focus/raise-on-mouse-down behavior without affecting the
tiling drag operation.

fixes https://github.com/i3/i3/issues/5169
2022-10-24 21:12:48 +02:00
bodea
7abd58abf2 Escape ~ to prevent interpretation as subscript. (#5168) 2022-10-24 21:12:43 +02:00
Matias Goldfeld
d62183a2b8 Fix segfault during config validation (#5167) (#5173)
Configs with bar blocks will segfault during validation since they
copy the i3 font which is not set during validation.
2022-10-24 21:12:38 +02:00