7524 Commits

Author SHA1 Message Date
Junicchi
1597ec27ee
add WINDOW_TYPE_NOTIFICATION to floating list (#6017)
as explained in this discussion:
https://github.com/i3/i3/discussions/5966#discussioncomment-8961295
2024-05-16 07:50:06 +00:00
Orestis Floros
6094944345
testsuite docs: Update instructions (#6034)
- Only recommend local perl library installation
- Update build instructions to match hacking-howto
2024-05-05 10:47:17 +02:00
Orestis Floros
d54a10b200
i3bar-workspace-protocol: Make examples (more) POSIX compliant (#6029)
See https://unix.stackexchange.com/a/581410, `read` needs a variable
name.

Came up in #5939
2024-04-30 13:41:45 +02:00
Orestis Floros
e020701df1
errorlog: Check errorfile exists (#6028)
Fixes #6027
2024-04-30 13:39:54 +02:00
Wesley Schwengle
5834b7e824
Use I3SOCK environment variable for path in AnyEvent::I3 (#5987)
Commit 3ae5f31d0 introduced the I3SOCK environment variable. This
prevents us from having to call `i3 --get-socketpath'. In case the
variable doesn't exist, fall back to the old ways.

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-19 19:12:11 +02:00
Michael Stapelberg
91ce3bdbd5
AnyEvent::I3: rip out taint mode compatibility (#5999)
I suspect nobody actually uses Perl’s taint mode with AnyEvent::I3.

See https://github.com/i3/i3/pull/5987 for discussion.
2024-04-19 08:45:34 +02:00
yuvallangerontheroad
ffbbbf3477
Add a newline at the end of the version option output. (#5980)
If there is no newline character at the end of the version option's
output, the next command line prompt is written left to the version,
rather than under it.
2024-04-16 11:38:23 +00:00
Michael Stapelberg
051d3537e3
AnyEvent-I3: bump to 0.19 (#5990)
fixes https://github.com/i3/i3/issues/5986
2024-04-09 17:43:02 +02:00
Wesley Schwengle
d91597b1c1
Check if subscribe event type is supported in AnyEvent::I3 (#5988)
Add simple `if exists' construct in the subscribe function. This
prevents a somewhat cryptic warnings such as these:

Use of uninitialized value $type in hash element at
/usr/share/perl5/AnyEvent/I3.pm line 309.

We still warn the user, but it is much clearer as to what the cause is.

It now shows something like this:

Could not subscribe to event type 'foo'. Supported events are _error
barconfig_update binding mode output shutdown tick window workspace

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-09 08:28:40 +02:00
systec-awe
47cab33aa8
Fix missing SIGUSR2 posix signal handling (#5960)
Since there is no separate error handling the `SIGUSR2` signal is
registered to get the write return code after exiting the program.

Fixes #5958

---------

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
2024-03-20 12:58:56 +00:00
Orestis Floros
910e58585f
Support multiple _NET_WM_STATE changes in one ClientMessage (#5910) 2024-02-12 08:40:39 +01:00
rsgowman
6a530de220
Create new workspaces to the right of existing ones with the same number
i.e. creating workspaces named "1", "2:a", "2:b", "3" should result in
that same order rather than "1", "2:b", "2:a", "3".
2024-02-06 20:28:20 +01:00
rsgowman
0639167185
Don't skip identically numbered workspaces when moving to next/prev (#4578)
eg if you have workspaces: { 1, 2:a, 2:b, 3 } and are on workspace 1,
then 'workspace next' should traverse 1 -> 2:a -> 2:b -> 3 -> 1 instead
of 1 -> 2:a -> 3 -> 1.

Fixes #4452
2024-02-06 20:07:21 +01:00
Orestis Floros
60cc6ce174
Use new GitHub issue templates (#5900)
Biggest benefit is that the users are presented with a set of editable
fields instead of having to edit markdown directly in a text box, which
is less friendly. Links to userguide and IPC docs are clickable in the
description.

See
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
2024-02-05 08:27:31 +01:00
Harimbola Santatra
b9a796b24a
doc: update meson build instruction (#5899)
The [official build instruction][1] are deprecated on Meson 1.3.1.
These command:

    mkdir -p build && cd build
    meson ..
    ninja

... work but will yield the following warning:

> WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

Here's the correct way, according to the [meson documentation][2]:

    mkdir -p build
    meson setup build
    meson compile -C build
    meson install -C build


[1]: https://i3wm.org/docs/hacking-howto.html#_building_i3
[2]: https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project
2024-02-04 15:50:36 +01:00
Orestis Floros
f8befe378a
Avoid creating redundant containers when switching between tabbed/stacked and split layouts (#5469)
Fixes #3001
2024-01-31 08:14:32 +01:00
Orestis Floros
230147c815
smart_borders: Deprecate option (#5889)
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 #5406.
2024-01-30 08:53:32 +01:00
Orestis Floros
c3173af2f1
Merge pull request #5787 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 (#5818)
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2024-01-28 11:30:28 +01:00
Orestis Floros
f169624560
clang-format: enable InsertBraces (#5882)
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 (#5880)
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} (#5840)
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 #2380.
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 (#5754)
Additionally, adds some tests for the command.

Fixes #5744
2023-11-05 11:08:44 +01:00
Orestis Floros
a36618f96c
Clean up old release notes (#5753) 2023-11-05 11:08:10 +01:00
Orestis Floros
b42dc21068
bindings: Do not grab pointer when executing bindings (#5755)
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
b66445670695f48f52988e2cc81d2ea7f03cf237.

Fixes #5735
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 4.23 2023-10-29 09:57:51 +01:00
Sergey Zhmylove
26608b74d9
Fix failing testcase when the font exists (#5679)
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 (#5665) 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 #5658
2023-09-06 17:24:53 +02:00
Orestis Floros
c1c405f4fc
Update to actions/checkout@v4 (#5653)
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: #5523

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 (#5650)
Fixes #5616
2023-09-03 19:32:42 +02:00
Uli Schlachter
d6e2a38b5c
Share graphics context globally (#4376)
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 (#5554)
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 (#5541) 2023-06-26 14:43:33 +02:00
Nikolay Nechaev
3ae5f31d04
Remove the double forking in start_application (#5510)
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 #5506
2023-06-15 08:38:35 +02:00
Orestis Floros
a95870120c
fix workspace not being focused on title bar scroll (#5518) 2023-05-29 14:08:46 +02:00