Commit graph

53 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
2c181fcb21 Translate all Chinese comments to English in source files
- Translate comments in src/client/client.h
- Translate comments in src/config/parse_config.h
- Translate comments in src/data/static_keymap.h
- Translate comments in src/dispatch/bind_define.h
- Translate comments in src/ext-protocol/*.h
- Translate comments in src/fetch/*.h
- Translate comments in src/layout/*.h
- Translate comments in src/mango.c

All Chinese comments have been accurately translated to English
while preserving the technical meaning and context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 09:50:35 +00:00
copilot-swe-agent[bot]
5d145cc80f Simplify code based on final review feedback
- Use direct character assignment for constant strings
- Remove unnecessary tracking array and cleanup code
- Simplify string concatenation logic
- Fix length calculation to match actual strncat behavior
- Code is cleaner and more maintainable

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
2026-02-18 09:02:22 +00:00
copilot-swe-agent[bot]
21088fe86a Final refinements for security and performance
- Add explicit null termination for consistency
- Optimize string concatenation to avoid redundant strlen calls
- Track actual characters added to maintain O(n) complexity
- Improve code clarity with better comments

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
2026-02-18 09:01:20 +00:00
copilot-swe-agent[bot]
12fe0abca1 Polish security fixes with minor improvements
- Remove redundant null termination for short strings
- Use descriptive variable names in cleanup loop
- Cache strlen results to avoid O(n²) complexity in string concatenation
- Add bounds checks before string operations

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
2026-02-18 09:00:02 +00:00
copilot-swe-agent[bot]
e2649dd84f Final security improvements based on code review
- Add LAYOUT_ABBR_SIZE constant to avoid magic numbers
- Track allocated argv entries to properly free on error
- Simplify strncat bounds checking using strlen for accuracy
- Ensure all allocated memory is freed in error paths

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
2026-02-18 08:58:36 +00:00
copilot-swe-agent[bot]
d017fc4837 Address code review feedback on security fixes
- Fix buffer size for strncpy to match actual buffer (32 bytes)
- Use strtoul instead of strtol for unsigned color values
- Improve strncat bounds checking with accurate length tracking
- Free wordexp results immediately after use instead of batching
- Add strdup for wordexp strings to avoid use-after-free

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
2026-02-18 08:57:08 +00:00
copilot-swe-agent[bot]
9d2f852ec2 Fix critical buffer overflow and memory leak vulnerabilities
- Replace unsafe strcpy() with strncpy() in fetch/common.h
- Replace unsafe strcpy() with strncpy() in config parsing
- Fix buffer overflow from strcat() by adding bounds checking
- Fix memory leak by adding wordfree() for wordexp results
- Add integer overflow validation for strtol() calls
- Add errno checking for all strtol conversions

Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
2026-02-18 08:54:42 +00:00
DreamMaoMao
0fe87e6286 fix: fix multi master focus record error 2026-02-13 20:23:03 +08:00
DreamMaoMao
334bc076a0 opt: optimize smartgap 2026-01-24 22:58:47 +08:00
DreamMaoMao
04ac4bf99c opt: find same stack first in direction find 2026-01-20 11:28:33 +08:00
DreamMaoMao
eff11a5912 opt: focusdir miss remember focuslink when between two different stack client 2026-01-19 12:13:51 +08:00
DreamMaoMao
48c466254a feat: optimize focusdir to respect focusstack 2026-01-19 10:38:09 +08:00
nixpup
e0d69ece59 feat: add scroller stack support 2026-01-18 20:06:27 +08:00
DreamMaoMao
4efb8c5e06 fix: isfloating rule not follow monitor rule 2026-01-08 10:13:21 +08:00
DreamMaoMao
2771053ee6 opt: animations logic all use the int type
avoid the coordinates being forcibly limited to positive numbers
2026-01-03 09:37:34 +08:00
DreamMaoMao
23d550e04d fix: avoid use null mon when session not active 2026-01-01 14:48:49 +08:00
DreamMaoMao
5ee43c302a opt: not focus isunglobal window when focusstack 2025-12-31 17:27:43 +08:00
DreamMaoMao
42f722ada2 opt: reset global window record per when arrange 2025-12-29 10:48:48 +08:00
DreamMaoMao
526a09c480 opt: not search disable node in xytonode 2025-12-27 09:54:29 +08:00
DreamMaoMao
0212ee7177 opt: remove useless code 2025-12-16 12:02:34 +08:00
DreamMaoMao
b5848f38b4 fix: crash when use focusstack 2025-12-16 11:57:56 +08:00
DreamMaoMao
f3f3215791 fix: nmaster num caculate error in master layout 2025-12-07 21:34:05 +08:00
DreamMaoMao
0e59209d2b opt: focusdir use same monitor client first 2025-12-04 17:41:25 +08:00
DreamMaoMao
5c314be8c6 break change: remove autostar.sh and MANGOCONFIG env 2025-12-03 16:22:13 +08:00
DreamMaoMao
1ffdc1ef38 feat: support -c option to specified config file 2025-12-03 16:12:05 +08:00
DreamMaoMao
bfcde37aba opt: optimize namedscratchpad when swallow 2025-12-03 08:18:35 +08:00
DreamMaoMao
b9952f03b5 opt: change unsigned int to uint32_t 2025-12-02 16:57:24 +08:00
DreamMaoMao
1b7e998b67 opt: optimize scroller layout center client judge 2025-11-30 13:40:48 +08:00
DreamMaoMao
2f9cabe4b2 fix: sloppyfocus not work when move cursor slowly 2025-11-27 22:40:41 +08:00
DreamMaoMao
cdcc64ab5f feat: support scroll maximize and fullscreen window 2025-11-19 12:41:03 +08:00
DreamMaoMao
d85f4375c8 fix: fix border color change when swithc mon focus 2025-11-19 12:41:03 +08:00
DreamMaoMao
12e5c03600 fix: miss free kb_layout string 2025-11-01 22:54:53 +08:00
DreamMaoMao
8420d3496a
Merge branch 'main' into feat/focus-animation 2025-11-01 19:27:09 +08:00
DreamMaoMao
6fdb962786 fix: fix focus animation error 2025-11-01 16:00:25 +08:00
DreamMaoMao
0ab38c6aa6 opt: optimize null check in get_next_stack_client 2025-11-01 14:39:41 +08:00
DreamMaoMao
cbcbda25cd break change: correct maxmize to maximize 2025-10-28 20:29:25 +08:00
DreamMaoMao
918a00d578 opt: allow switch focus between fullscreen and floating window in focusstack 2025-10-27 12:46:04 +08:00
DreamMaoMao
bc2b22946c opt: only find same monitor when find same x and same y client 2025-10-26 15:38:19 +08:00
DreamMaoMao
ca48f95997 feat: support resize tile window 2025-10-11 11:25:22 +08:00
DreamMaoMao
1eb5904aa6 opt: Initialize all Client Pointers to NULL 2025-10-06 14:11:36 +08:00
DreamMaoMao
38917d9f96 opt: allow use cursor to select ime popup item 2025-10-02 17:18:09 +08:00
DreamMaoMao
78990f66ff opt: optimize code struct 2025-09-28 18:34:11 +08:00
DreamMaoMao
b273ea5811 fix: error offset position for setclient_coordinate_center 2025-09-28 14:13:44 +08:00
DreamMaoMao
3a21ef8801 feat: add option scratchpad_cross_monitor 2025-09-24 20:08:20 +08:00
DreamMaoMao
6d24ee3945 fix: root client shouldn't use invisble client and floating client 2025-09-20 20:16:47 +08:00
DreamMaoMao
31ac4bd6ed feat: make ~0 tag own independent layout 2025-09-15 22:06:10 +08:00
DreamMaoMao
d86045fa28 fix: error judge for curtag whether is scroller layout 2025-09-15 20:07:12 +08:00
DreamMaoMao
1311d9a18c opt: optimize code struct 2025-09-11 07:13:06 +08:00
DreamMaoMao
7a4eaeaa8e fix: miss free kb_layout memory 2025-08-27 10:23:33 +08:00
DreamMaoMao
9ec80f0918 fix: scroller not work in ~0 tag 2025-08-24 23:20:19 +08:00