Commit graph

1380 commits

Author SHA1 Message Date
DreamMaoMao
89a4ec83a0 fix: avoid mutual influence of monitor rules 2026-03-07 14:03:59 +08:00
DreamMaoMao
fd68f188c6 opt: add some comment 2026-03-07 14:03:59 +08:00
DreamMaoMao
63b9ffb1a4 opt: opt the old size per init 2026-03-07 12:54:37 +08:00
DreamMaoMao
95481623cb
Merge pull request #742 from kanvolu/main
Added cycling both ways for switch_proportion_preset
2026-03-07 12:44:51 +08:00
kanvolu
10d7e5c6e3 Added cycling both ways for switch_proportion_preset
Now switch_proportion_preset requires an argument "prev" or "next" to
determine cycle direction
2026-03-07 12:36:59 +08:00
DreamMaoMao
9a17a0279c feat: add custom option to monitorrule 2026-03-06 18:21:49 +08:00
DreamMaoMao
11b4bb03bf feat: support the repeated exchange of the same two clients 2026-03-06 14:27:24 +08:00
DreamMaoMao
6522e18d08 opt: fix potential issues caused by uninitialization 2026-03-06 13:25:24 +08:00
DreamMaoMao
9df273cdf9 opt: clear some comment 2026-03-05 23:03:01 +08:00
DreamMaoMao
0f68187cd0 opt: support restore size per when master change 2026-03-05 20:59:34 +08:00
DreamMaoMao
bf10fabfc2 fix: popup unconstrain cross monitor 2026-03-05 08:27:59 +08:00
DreamMaoMao
7f99b5ff48 feat: use monitor spec to match windowrule monitor field 2026-03-04 12:17:44 +08:00
DreamMaoMao
1e1d41e626 feat: add windowrule option indleinhibit_when_focus 2026-03-03 14:51:32 +08:00
DreamMaoMao
9aa2d3cd33 opt: rename hide_source var to hide_cursor_source 2026-03-03 13:03:35 +08:00
DreamMaoMao
46e867deb9 opt: always arrangelayers if layer commit 2026-03-02 20:53:52 +08:00
DreamMaoMao
ad754167b7 fix: last_cursor surface destroy detect error 2026-03-02 09:40:50 +08:00
DreamMaoMao
0673a9241d
Merge pull request #724 from hboetes/fix-last-cursor-use-after-free
Fix use-after-free crash in cursor surface handling
2026-03-02 09:04:43 +08:00
DreamMaoMao
20dbffdfaf opt: avoid unnecessary action when layer surface commit 2026-03-02 08:35:32 +08:00
DreamMaoMao
263b1845bb opt: optimize layer focus change logic 2026-03-02 08:15:52 +08:00
Han Boetes
c403a47894 Fix use-after-free crash in cursor surface handling
### Problem

`setcursor()` stores the client-provided `wlr_surface` pointer in
`last_cursor.surface`, but never registers a destroy listener on it.
When the client exits (e.g. closing a launcher like fuzzel), the surface
is destroyed, but `last_cursor.surface` still holds the stale pointer.

If the cursor hide timeout fires while the cursor surface is alive, and
the client then exits, the next mouse movement calls
`handlecursoractivity()`, which passes the dangling pointer to
`wlr_cursor_set_surface()`. This causes a SIGSEGV in `wl_list_insert()`
inside libwayland-server, as the `wl_list` embedded in the destroyed
surface struct has been freed.

A secondary issue exists in `setcursorshape()`: when a client switches
from a custom cursor surface to a shape cursor, `last_cursor.surface` is
set to NULL but the destroy listener (if registered) is not removed,
leaving a dangling listener on the destroyed surface.

The crash only manifests when `cursor_hidden` is true at the moment of
the mouse movement, which is why it is intermittent and difficult to
reproduce.

### Root cause

Confirmed via `coredumpctl debug` and `bt full`:

```
#0  wl_list_insert (libwayland-server.so)
#1  wlr_cursor_set_surface (libwlroots)
#2  handlecursoractivity (mango.c)
#3  motionnotify (mango.c)
#4  motionrelative (mango.c)
#5  wl_signal_emit_mutable
#6  handle_libinput_readable
```

### Fix

- Add a `wl_listener` (`last_cursor_surface_destroy_listener`) that
clears `last_cursor.surface` and removes itself when the surface is
destroyed.
- Initialize the listener's link in `setup()` so `wl_list_empty()`
checks are reliable from the start.
- In `setcursor()`, remove any existing listener before registering a
new one on the incoming surface.
- In `setcursorshape()`, remove the destroy listener when switching to a
shape cursor.
- Add a NULL guard in `handlecursoractivity()` as a safety net.
2026-03-01 21:58:03 +01:00
DreamMaoMao
6cc7d16281 opt: only set on_demand layer focus when it request in init_commit 2026-03-02 00:56:47 +08:00
DreamMaoMao
9922ed26c7 update readme 2026-03-01 18:13:40 +08:00
DreamMaoMao
8c8d8025c7
Merge pull request #720 from mangowm/revert-685-optional-session-manager
Revert "Add nix option to enable/disable adding to session manager"
2026-03-01 18:04:41 +08:00
DreamMaoMao
008cb9726e
Revert "Add nix option to enable/disable adding to session manager" 2026-03-01 18:04:21 +08:00
DreamMaoMao
243848f43e bump version to 0.12.5 2026-03-01 12:02:57 +08:00
DreamMaoMao
755ffe06af update website in readme 2026-03-01 11:42:44 +08:00
DreamMaoMao
811610e481 rename mangowc to mangowm 2026-03-01 11:38:17 +08:00
DreamMaoMao
e935af07c1 project: rename guix file 2026-03-01 11:35:51 +08:00
DreamMaoMao
43965a1155 update readme 2026-03-01 11:21:24 +08:00
DreamMaoMao
94380a3e07
Merge pull request #559 from WeraPea/pointer-events-fix
fix: pointer events being one event behind
2026-02-28 23:36:57 +08:00
DreamMaoMao
835269f86b opt: make spawn and spawn_shell log to debug log 2026-02-26 23:22:51 +08:00
DreamMaoMao
43114bbf8d
Merge pull request #713 from noor-latif/fix/nix-update-xcbutilwm-to-libxcb-wm
fix(nix): update deprecated xorg package names to top-level
2026-02-26 17:53:06 +08:00
Noor Latif
b338391984 fix(nix): update deprecated xorg package names to top-level
xcbutilwm → libxcb-wm

This eliminates the deprecation warnings:
- "The xorg package set has been deprecated, 'xorg.xcbutilwm' has been renamed to 'libxcb-wm'"

Changes:
- nix/default.nix:14: xcbutilwm, → libxcb-wm,
- nix/default.nix:60: xcbutilwm → libxcb-wm
2026-02-26 09:25:25 +00:00
DreamMaoMao
4787402b12 opt: optimize monitorrule check 2026-02-26 13:30:42 +08:00
DreamMaoMao
cbc344ab88 fix: avoid opacity exceeds the threshold due to overshot animation curve 2026-02-26 08:29:27 +08:00
DreamMaoMao
1dac96b426 bump version to 0.12.4 2026-02-25 21:53:35 +08:00
DreamMaoMao
6667708d9a feat: monitor arg support multi spec match in disptach 2026-02-25 19:16:06 +08:00
DreamMaoMao
43d0f0f54a opt: remove useless code 2026-02-25 17:35:19 +08:00
DreamMaoMao
bc5cf2c7d7 opt: remove useless code 2026-02-25 17:25:05 +08:00
DreamMaoMao
c344dfe7a2
Merge pull request #709 from qaqland/clean-rendermon
opt: remove unused variable in function rendermon
2026-02-25 17:23:31 +08:00
qaqland
e1c038ae08 opt: remove unused variable in function rendermon
Signed-off-by: qaqland <anguoli@uniontech.com>
2026-02-25 16:58:18 +08:00
DreamMaoMao
6894a36019 opt: remove some portal file comment 2026-02-25 15:24:11 +08:00
DreamMaoMao
5412bbe3b6 Merge pull request #685 from jtliang24/optional-session-manager
Add nix option to enable/disable adding to session manager
2026-02-25 15:23:54 +08:00
DreamMaoMao
564df864bf fix: popup position constrain not work for some app 2026-02-25 15:23:54 +08:00
DreamMaoMao
a28647585f feat: set dbus env auto 2026-02-24 21:40:26 +08:00
Jiatao Liang
2f630c950e optional-session-manager 2026-02-23 22:59:31 -05:00
DreamMaoMao
f8fa7a856c opt: optimize frame skip logic 2026-02-23 08:01:45 +08:00
DreamMaoMao
6b2d694b23 update readme 2026-02-22 11:51:28 +08:00
DreamMaoMao
cad564ba56
Merge pull request #684 from Baba-Is-Win/patch-1
include tgmix in README.md
2026-02-22 09:51:02 +08:00
Mujk
ee8a7b5961 docs: fix guix installation instructions
- Rename GuixSD to Guix System (the distro was renamed in 2019)
2026-02-22 09:49:13 +08:00