Commit Graph

7508 Commits

Author SHA1 Message Date
Orestis Floros
230147c815
smart_borders: Deprecate option ()
This had pretty much identical behaviour to hide_edge_borders which made
it confusing. The `hide_edge_borders smart_no_gaps` implementation has an extra check
which fixes .
2024-01-30 08:53:32 +01:00
Orestis Floros
c3173af2f1
Merge pull request from elebow/userguide-default_border-title-layout-note
docs: Add note to `default_border` about title bar in stacking/tabbed
2024-01-28 13:00:16 +01:00
Alessandro Vinciguerra
ca510e5e0f
Shrinking on a per-block basis ()
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2024-01-28 11:30:28 +01:00
Orestis Floros
f169624560
clang-format: enable InsertBraces ()
Enforces a rule that we have followed for years now. Yes, the diff is
quite big but we get it over with once and we prevent having to nit-pick
future PRs.
2024-01-27 11:37:05 +01:00
Orestis Floros
5fdfb14530
con_is_maximized: Fix case where parent is workspace ()
See added test for simple example.
2024-01-26 08:51:28 +01:00
Seth Pollen
a56670bca8 split up compound test assertions 2024-01-24 14:29:01 +01:00
sethpollen
b660d6a902
Add support for _NET_WM_STATE_MAXIMIZED_{HORZ, VERT} ()
If a window occupies the entirety of its workspace vertically and/or horizontally, pass it the _NET_WM_STATE_MAXIMIZED_{HORZ, VERT} atoms. This helps applications like Google Chrome draw the tab bar correctly and handle tab clicks correctly (see https://crbug.com/1495853).

This change is based on work from @yshui in .
2024-01-22 20:34:40 +01:00
Yonas Yanfa
9aba43119b Make raphamorim/rio one of i3's sensible terminals. 2023-12-13 12:45:14 +02:00
Eddie Lebow
96d3762712
docs: Add note to default_border about title bar in stacking/tabbed
See <https://github.com/i3/i3/issues/2664>.
2023-11-26 02:38:02 -05:00
Orestis Floros
69f68dcd74
focus workspace: consider workspace_auto_back_and_forth ()
Additionally, adds some tests for the command.

Fixes 
2023-11-05 11:08:44 +01:00
Orestis Floros
a36618f96c
Clean up old release notes () 2023-11-05 11:08:10 +01:00
Orestis Floros
b42dc21068
bindings: Do not grab pointer when executing bindings ()
Grabing the pointer produces a `GrabFrozen` error in applications that
are run from key bindings. Since we don't need the pointer in such
cases, we can change the call to use ASYNC. This seems to be a
historical leftover.

I've tested locally that these still work:
- bindsym $mod+x ...
- bindsym --release $mod+x ...
- bindsym $mod+button1 ...
- bindsym --release $mod+button1 ...
- bindsym --release $mod+x exec program that grabs the keyboard
  now works (see original issue)

Even in the main branch, I actually couldn't get `import` and `xdotool`
to fail with the pointer being frozen, potentially because these
programs wait a bit for the pointer to be unfrozen like i3lock does.

This patch came up in
https://github.com/i3/i3/issues/5735#issuecomment-1781321011

I wonder why the pointer is actually grabbed.

The argument I change in `xcb_grab_key` there, is `pointer_mode`, from
https://www.x.org/releases/X11R7.7/doc/man/man3/xcb_grab_key.3.xhtml:
```
pointer_mode

One of the following values:
XCB_GRAB_MODE_SYNC

The state of the keyboard appears to freeze: No further keyboard events are generated by the server until the grabbing client issues a releasing AllowEvents request or until the keyboard grab is released.

XCB_GRAB_MODE_ASYNC

Keyboard event processing continues normally.
```

I traced via `git blame` the usage of `xcb_grab_key` throughout 14 years
of i3 development and it seems that `pointer_mode` was always set to
`XCB_GRAB_MODE_SYNC`, going all the way back to
b664456706.

Fixes 
2023-11-05 11:04:04 +01:00
a-kenji
f1f2282947 docs: fix typo in i3bar-workspace-protocol 2023-11-04 12:18:03 +01:00
Michael Stapelberg
1da50c4ae0 debian: update changelog 2023-10-29 15:42:25 +01:00
Michael Stapelberg
06b3137bd7 Merge branch 'release-4.23' 2023-10-29 09:58:05 +01:00
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
Sergey Zhmylove
26608b74d9
Fix failing testcase when the font exists ()
When the font from testcase's config exists on the system,
load_configuration() does not fallback to a 'fixed' one resulting in a
fail of this case.
The fallback scenario is added as well.
2023-09-23 17:06:54 +02:00
Orestis Floros
5489db6bc8 motif hints: respect maximum border style in append_layout 2023-09-21 18:55:01 +02:00
Orestis Floros
f4959d5da4 Update to clang-format-15 2023-09-21 18:55:01 +02:00
Orestis Floros
bffa4a543c
userguide: Add an example for negative lookeaheads () 2023-09-13 08:42:52 +02:00
Orestis Floros
908c86544b remanage_window: Refactor to make clearer when a swallowing happens 2023-09-06 17:24:53 +02:00
Orestis Floros
82b9821204 Remanage window after urgency flag change
Fixes 
2023-09-06 17:24:53 +02:00
Orestis Floros
c1c405f4fc
Update to actions/checkout@v4 ()
Update to [actions/checkout@v4](https://github.com/actions/checkout/releases/tag/v4.0.0)

According to https://github.com/actions/checkout/issues/1448 it might fix the issue we are encountering. Even if it doesn't, no apparent harm from using the latest version.
2023-09-05 17:18:38 +02:00
Wesley Schwengle
c6befec0fd Fix dead links for Modern Perl book
Closes: 

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2023-09-04 16:09:05 +02:00
Orestis Floros
c6f62f4695
Fix crashes when using machine criterion ()
Fixes 
2023-09-03 19:32:42 +02:00
Uli Schlachter
d6e2a38b5c
Share graphics context globally ()
Instead of creating a graphics context for every surface_t, this commit
adds a cache that allows to "remember" up to two GCs. Thus, the code
uses less GCs. When a GC from the cache can be used, this also gets rid
of a round-trip to the X11 server. Both of these are tiny, insignificant
savings, but so what?

Since GCs are per-depth, this code needs access to get_visual_depth().
To avoid a code duplication, this function is moved to libi3.

Fixes: https://github.com/i3/i3/issues/3478
Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-07-22 10:24:13 +02:00
slyshot
6fe98f7847 Remove focus workaround 2023-07-21 13:52:44 +02:00
Orestis Floros
9947890472 Fix gcc false-positive warning 2023-07-15 21:27:11 +02:00
Orestis Floros
cf2ea348c7 debugging docs: Add note about ptrace
Also remove outdated section about IRC
2023-07-15 21:27:11 +02:00
Orestis Floros
e6b41172da
Regrab buttons on mode change ()
Unfortunately, grabbing / ungrabbing doesn't seem to work correctly in
xvfb so we can't really test this.

I also fixed the deduplication code in bindings_get_buttons_to_grab().
2023-06-30 08:57:19 +02:00
Harm te Hennepe
866e3dd909
Improve documentation regarding tiling drag () 2023-06-26 14:43:33 +02:00
Nikolay Nechaev
3ae5f31d04
Remove the double forking in start_application ()
Having just a single fork is beneficial, as it preserves the approprate
parent information for the children of i3, which is useful in some
scenarious e.g. when a child wants to do something on the wm's exit
(possible via `prctl(PR_SET_PDEATHSIG, ...)`).

Moreover, this is a zero-cost benefit: i3 is already using libev with
the default loop, which automatically reaps all the zombie children even
when there is no corresponding event set.

Resolves 
2023-06-15 08:38:35 +02:00
Orestis Floros
a95870120c
fix workspace not being focused on title bar scroll () 2023-05-29 14:08:46 +02:00
Orestis Floros
fde43a078b
Merge pull request from slyshot/next
Fix top border resizing registered on tiled windows
2023-05-05 14:15:47 +02:00
slyshot
a715c03d30 Fix top border resizing registered on tiled windows 2023-04-27 20:20:41 -04:00
Orestis Floros
fae2b637ee
i3-input: Avoid compiler warning ()
Also updates the function to use proper types, const and style.

The warning:

../i3/i3-input/main.c: In function ‘finish_input’:
../i3/i3-input/main.c:187:13: warning: ‘__builtin_strncat’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  187 |             strncat(dest, command, inputlen);
      |             ^
../i3/i3-input/main.c:175:20: note: length computed here
  175 |     int inputlen = strlen(command);

Which is triggered because gcc thinks it's bad that `input_len` (the
length of the source in the copy) is used instead of a length that is
inside the limits of the allocated size for the destination. However, in
practice, `full_len` is always than `input_len`.
2023-04-22 18:59:03 +02:00
Orestis Floros
d06f97c4d4
GH Actions: Check for gcc before deploying ()
Fixes 
2023-04-11 20:11:30 +02:00
Orestis Floros
13474ff787
man page: Update outdated information ()
Instead of correcting some of them, I completely deleted them since the
userguide is always more up-to-date.

Fixes 
2023-04-10 18:36:02 +02:00
Orestis Floros
74785f4795
Allow switching workspaces when in global fullscreen mode ()
Fixes 
2023-04-02 18:55:21 +02:00
Orestis Floros
d7583fbc17
Update some of the hacking docs () 2023-04-02 16:28:06 +02:00
Orestis Floros
fbb6bf666f
hacking-howto: Update build instructions for meson () 2023-04-02 16:27:16 +02:00
Orestis Floros
892ae730cb
Update ubuntu & clang-format in builds () 2023-04-02 16:24:15 +02:00
Orestis Floros
ecb9b895c7
docker: fix missing address sanitizer dependency () 2023-04-02 15:39:13 +02:00
Orestis Floros
a5da4d54f3
GitHub Actions: revert changes and use if on each step () 2023-01-23 19:50:28 +01:00
Orestis Floros
3702960a87
Actions: Fix BASENAME env vars () 2023-01-23 18:57:08 +01:00
Orestis Floros
6911c116e7
GitHub Actions: push artifacts only on next branch () 2023-01-23 17:39:55 +01:00
Orestis Floros
bfbe73f665
Merge pull request from nikitabobko/bobko/userguide
Fix "default binding" mistake in userguide
2023-01-23 13:20:31 +01:00
Nikita Bobko
0f64420281 Fix "default binding" mistake in userguide
Default binding to move window down is $mod+Shift+k, not $mod+Shift+j.
Proof: https://github.com/i3/i3/blob/next/etc/config#L45
This commit reverts this pull request https://github.com/i3/i3/pull/4146
2023-01-23 11:49:37 +01:00
Orestis Floros
26990d90f2
Merge pull request from i3/i3bar-ws-protocol
i3bar: Add protocol for workspace buttons
2023-01-22 19:05:01 +01:00