Commit graph

333 commits

Author SHA1 Message Date
cheerfulScumbag
87313d7464
Merge f86ec6876a into b9c6a2c196 2026-04-24 10:42:02 +02:00
mdouda
ac61923e2f active constraint nesting for input capture 2026-04-23 23:20:52 +08:00
DreamMaoMao
461dcb6989 fix: opensilent client should insert fstack tail 2026-04-21 17:44:56 +08:00
DreamMaoMao
60f31cd1bf opt: dont apply viewback dispatch when no tag change 2026-04-21 10:31:52 +08:00
cheerfulScumbag
f86ec6876a remove dead helper 2026-04-06 09:17:29 +01:00
cheerfulScumbag
e2b63a06d7 Harden session launch command recovery 2026-04-06 09:17:29 +01:00
cheerfulScumbag
818f80c068 Improve automatic session launch command recovery# 2026-04-06 09:17:29 +01:00
cheerfulScumbag
44b761dbe2 Add opt-in session save and restore support 2026-04-06 09:16:40 +01:00
DreamMaoMao
52676492fe opt: optimize foreign toplevel state sync 2026-03-30 18:35:37 +08:00
DreamMaoMao
63256ea31b break: rename force_maximize to force_fakemaximize 2026-03-26 18:05:25 +08:00
DreamMaoMao
e6429f8733 opt: not unset maximize state if enable force_maximize 2026-03-24 17:23:42 +08:00
DreamMaoMao
064bcad6f7 opt: optimize fullscreen state change 2026-03-23 10:56:35 +08:00
DreamMaoMao
deb47e8ab9 opt: not need to reset float_geom in setfullscreen and setmaximizescreen
Some checks are pending
Sync website / sync-website (push) Waiting to run
Sync wiki / sync-wiki (push) Waiting to run
2026-03-19 17:02:48 +08:00
DreamMaoMao
ca665cc6f8 opt: optimize state change between flating maximizescrenn and fullscreen 2026-03-19 15:27:43 +08:00
DreamMaoMao
c776356efe fix: size per not restroe when togglefloating 2026-03-19 10:24:43 +08:00
DreamMaoMao
c2559f6c7c feat: add dispatch toggle_all_floating 2026-03-19 08:00:05 +08:00
DreamMaoMao
949063804a fix: open_as_floating not match tag correctly 2026-03-19 07:36:50 +08:00
DreamMaoMao
6c81384c53 feat: add tag rule option open_as_floating 2026-03-18 23:43:01 +08:00
DreamMaoMao
7a1a3f0ca4 opt: preset _JAVA_AWT_WM_NONREPARENTING to 1
Some checks are pending
Sync website / sync-website (push) Waiting to run
Sync wiki / sync-wiki (push) Waiting to run
2026-03-15 14:25:57 +08:00
DreamMaoMao
32c36ba485 opt: optimzie code struct
Some checks are pending
Sync website / sync-website (push) Waiting to run
Sync wiki / sync-wiki (push) Waiting to run
2026-03-14 13:09:41 +08:00
DreamMaoMao
23af3c5595 opt: auto sync XCURSOR_SIZE and XCURSOR_THEME env from config 2026-03-14 12:50:31 +08:00
tonybanters
a7461d9d5b opt: use config.xxx instead of global presets 2026-03-13 11:44:19 +08:00
DreamMaoMao
db30977196 opt: optimize popup unconstrain 2026-03-09 13:28:01 +08:00
DreamMaoMao
89a4ec83a0 fix: avoid mutual influence of monitor rules 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
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
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
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
cbc344ab88 fix: avoid opacity exceeds the threshold due to overshot animation curve 2026-02-26 08:29:27 +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
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
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
DreamMaoMao
f8fa7a856c opt: optimize frame skip logic 2026-02-23 08:01:45 +08:00
DreamMaoMao
d1fd128981 fix: auto set monitor coordinate when no match monitor rule 2026-02-21 18:55:33 +08:00