labwc/src
John Lindgren d96656ccdc menu: add struct menu_parse_context to reduce static vars
The lifetime of the "current_" variables (current_menu, current_item,
current_item_action) is very difficult to understand from reading the
code. It appears that e.g. current_menu could still point to a previous
menu when starting to parse a new one, with unpredictable results.

Let's use a context struct when parsing, and consistently initialize
it when beginning to build a new menu.

Lightly tested with:

- default menus (no menu.xml)
- example static menu from labwc.github.io/getting-started.html
- an added "client-list-combined-menu" sub-menu
- pipe menu generated by `labwc-menu-generator -p`

v2: style fix
2025-07-24 15:35:29 +09:00
..
common buf: avoid 'new' as variable name 2025-07-21 16:51:10 +02:00
config src: avoid implicit int/bool -> enum conversions 2025-07-21 16:51:10 +02:00
decorations project wide: clean up event listeners on shutdown 2025-03-13 17:33:51 +09:00
foreign-toplevel desktop: harden window stacking order while window switching 2025-03-09 20:41:26 +00:00
img src: add braces to switch cases containing declarations 2025-07-21 16:51:10 +02:00
input cursor: prevent hi-res mice triggering scroll actions too often 2025-07-22 19:31:55 +09:00
menu menu: add struct menu_parse_context to reduce static vars 2025-07-24 15:35:29 +09:00
protocols src: add braces to switch cases containing declarations 2025-07-21 16:51:10 +02:00
ssd src: put designated initializers in member order 2025-07-21 16:51:10 +02:00
action.c actions: prevent users entering invalid direction=any value 2025-07-19 12:29:55 +09:00
buffer.c src: avoid tentative definitions of static data 2025-07-21 16:51:10 +02:00
debug.c Replace multi_rect with lab_scene_rect 2025-06-10 06:03:03 +09:00
desktop-entry.c desktop-entry: localize application names 2025-04-02 20:43:45 +01:00
desktop.c desktop: give focus to a modal dialog rather than its parent 2025-06-13 18:40:29 +01:00
dnd.c dnd: show dnd icon above layer-shell surfaces 2024-06-25 14:56:57 +02:00
edges.c src: put designated initializers in member order 2025-07-21 16:51:10 +02:00
idle.c project wide: clean up event listeners on shutdown 2025-03-13 17:33:51 +09:00
interactive.c keyboard: add keyboard_get_all_modifiers() 2025-01-13 06:28:37 +09:00
layers.c layers.c: fix UAF bug on TTY change 2025-06-29 23:22:05 +02:00
magnifier.c chase wlroots: use WLR_PRIVATE (MR 4842) 2025-05-21 06:36:08 +01:00
main.c main: add feature flags to --version 2025-06-28 20:33:57 +01:00
meson.build icon-loader: rename to desktop-entry 2024-11-19 18:36:08 +01:00
node.c Strictly use handle_ prefix for signal handlers 2025-06-28 19:36:29 +09:00
osd-field.c src: avoid tentative definitions of static data 2025-07-21 16:51:10 +02:00
osd.c Replace scaled_rect_buffer with lab_scene_rect 2025-06-10 06:03:03 +09:00
output-state.c output: remove ported wlr_output functions 2024-10-29 21:39:19 +00:00
output-virtual.c Strictly use handle_ prefix for signal handlers 2025-06-28 19:36:29 +09:00
output.c Disable all output leasing due to a wlroots UAF 2025-07-06 19:59:43 +01:00
overlay.c Replace multi_rect with lab_scene_rect 2025-06-10 06:03:03 +09:00
placement.c Fix typos 2025-01-09 06:59:57 +00:00
regions.c keyboard: add keyboard_get_all_modifiers() 2025-01-13 06:28:37 +09:00
resistance.c src/snap-constraints.c: ignore view origin during constraint updates 2025-07-06 18:45:21 +01:00
resize-outlines.c Replace multi_rect with lab_scene_rect 2025-06-10 06:03:03 +09:00
seat.c Strictly use handle_ prefix for signal handlers 2025-06-28 19:36:29 +09:00
server.c Fix UAF when granting an output lease 2025-07-06 19:59:43 +01:00
session-lock.c session-lock: eliminate pointless compound literal 2025-07-21 16:51:10 +02:00
snap-constraints.c src/snap-constraints.c: ignore view origin during constraint updates 2025-07-06 18:45:21 +01:00
snap.c resistance: refactor snap constraints, use in interactive resistance 2025-07-06 18:45:21 +01:00
tearing.c Strictly use handle_ prefix for signal handlers 2025-06-28 19:36:29 +09:00
theme.c src: put designated initializers in member order 2025-07-21 16:51:10 +02:00
view-impl-common.c xwayland: fix possible loss of focus when multiple views are unmapped 2025-06-12 20:33:25 +01:00
view.c actions: added query tiled=any comparison for rc.xml simplification 2025-07-19 12:29:55 +09:00
window-rules.c scaled-icon-buffer: add icon priority 2025-06-27 14:05:42 +02:00
workspaces.c src/workspaces.c: allow dragged views to be moved to other workspaces 2025-06-27 13:30:30 +02:00
xdg-popup.c Destroy xdg_popups when its parent is destroyed 2025-06-18 20:19:48 +01:00
xdg.c Strictly use handle_ prefix for signal handlers 2025-06-28 19:36:29 +09:00
xwayland-unmanaged.c xwayland: correctly return seat focus from menus/tooltips in CLion 2025-06-12 20:33:25 +01:00
xwayland.c xwayland: fix swapped width/height in _NET_WM_ICON stride calculation 2025-07-13 03:51:40 +02:00