Commit graph

1395 commits

Author SHA1 Message Date
tonybanters
70c36ab699 Added config.xxx implementations for animations.
updated main function in config to use config.xxx instead of global presets

updated layout functions to take in new config defaults instead of globals

updated dispatch and ext-protocol as well to represent config defaults instead of globals

updated fetch/client.h to represent config.xxx instead of globals

updated ternarys to fall back to config.xxx instead of globals, also updated if statements and various selmon values to use config.xxx instead of globals.

fix: miss apply xkb rules

format code
2026-03-13 10:58:00 +08:00
DreamMaoMao
1fc89d01eb bump versito to 0.12.6 2026-03-10 11:18:43 +08:00
DreamMaoMao
db30977196 opt: optimize popup unconstrain 2026-03-09 13:28:01 +08:00
DreamMaoMao
d441ca22f4 opt: set scroller stack to same first tag 2026-03-08 20:20:13 +08:00
DreamMaoMao
a607d63ae7 opt: reset size per when toggleview 2026-03-08 20:00:44 +08:00
DreamMaoMao
36fb9c017d
Merge pull request #746 from ch4og/main
fix(guix): add deprecated package variable with old naming.
2026-03-08 12:58:55 +08:00
DreamMaoMao
a4ad8d0d19 fix: miss judge isdrag when resize stack in scroller 2026-03-08 08:45:56 +08:00
Nikita Mitasov
89a0f7e315
fix(guix): add deprecated package variable with old naming. 2026-03-07 22:18:46 +03:00
DreamMaoMao
cfe492fbc4 opt: fix a minor judgment error 2026-03-07 23:14:17 +08:00
DreamMaoMao
31284b4b5d opt: optimize center tile layout resizewin 2026-03-07 22:54:31 +08:00
DreamMaoMao
09c1707931 opt: optimize size per caculate when resizewin 2026-03-07 21:41:21 +08:00
DreamMaoMao
d0eb7d7114 opt: remove some config in default config file 2026-03-07 17:40:22 +08:00
DreamMaoMao
636060972d opt: change some default config 2026-03-07 17:29:37 +08:00
DreamMaoMao
b1d744ad1f feat: export drag interval to able configure 2026-03-07 17:22:06 +08:00
DreamMaoMao
75c888bbe4 opt: optimize resizewin setp with keyboard 2026-03-07 16:17:10 +08:00
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