labwc/include
tokyo4j f347a818e3 ssd: clean up scene management
Our codebase for ssd scenes has grown with a lot of technical debts:
- We needed to call `ssd_get_part()` everywhere to get the scene node of a
  ssd part. We then needed to cast it to `wlr_scene_rect` and
  `wlr_scene_buffer`. This bloated our codebase and even blocked
  duplicated button types in `<titlebar><layout>`.
- `ssd_get_part_type()` was a dirty hack. It compared parent, grandparent
  and grandgrandparent of a node with each subtree in the ssd to get the
  part type of the node.

To resolve this issues, this commit changes how ssd scenes are managed:
- Access scene rects and scene buffers just as a member of `struct ssd`.
- `ssd_part` is now a attachment to a scene node that can be accessed via
  node_descriptor->data, with a new node-descriptor type
  `LAB_NODE_DESC_SSD_PART`. `LAB_NODE_DESC_SSD_BUTTON` is unified into it.

Now the scene graph under ssd->tree looks like below. The parentheses
indicate the type of ssd_part attached to the node:

ssd->tree (LAB_SSD_NONE)
+--titlebar (LAB_SSD_PART_TITLEBAR)
|  +--inactive
|  |  +--background bar
|  |  +--left corner
|  |  +--right corner
|  |  +--title (LAB_SSD_PART_TITLE)
|  |  +--iconify button (LAB_SSD_BUTTON_ICONIFY)
|  |  |  +--normal close icon image
|  |  |  +--hovered close icon image
|  |  |  +--...
|  |  +--window icon (LAB_SSD_BUTTON_WINDOW_ICON)
|  |  |  +--window icon image
|  |  +--...
|  +--active
|     +--...
+--border
|  +--inactive
|  |  +--top
|  |  +--...
|  +--active
|     +--top
|     +--...
+--shadow
|  +--inactive
|  |  +--top
|  |  +--...
|  +--active
|     +--top
|     +--...
+--extents
   +--top
   +--...

When hovering on SSD, `get_cursor_context()` traverses this scene node
from the leaf. If it finds a `ssd_part` attached to the node, it returns
`ssd_part_type` that represents the resizing direction, button types or
`Title`/`Titlebar`.
2025-08-28 21:06:51 +01:00
..
common common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
config seat: improve debug logging when configuring input devices 2025-08-27 13:07:01 -04:00
foreign-toplevel foreign-toplevel: simplify and fully separate ext-foreign/wlr-foreign 2025-08-07 23:27:04 -04:00
img img: remove padding_x from lab_img_render() 2025-01-25 07:27:21 +09:00
input common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
menu menu: dynamically generate top-level pipemenus 2025-03-10 19:42:03 +00:00
protocols Fix typos 2025-01-09 06:59:57 +00:00
action-prompt-codes.h labnag: return special value on timeout 2025-08-12 03:10:14 +09:00
action.h action: add support for <prompt> in 'If' actions 2025-08-09 10:44:03 +01:00
buffer.h buffer: add buffer_create_from_wlr_buffer() 2025-06-07 02:12:56 +09:00
debug.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
decorations.h project wide: clean up event listeners on shutdown 2025-03-13 17:33:51 +09:00
desktop-entry.h Move "#if HAVE_LIBSFDO" inside desktop-entry.h 2025-01-25 07:27:21 +09:00
dnd.h chase (dnd): refactor to use wlroot's scene_drag_icon 2023-12-03 18:24:26 +00:00
edges.h common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
idle.h Add support for ext_idle_notify_v1.. 2023-07-09 08:26:33 +01:00
labwc.h common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
layers.h layers: don't send configure events in unmap handler 2025-06-27 22:03:37 +01:00
magnifier.h magnifier: rename some functions 2025-02-23 14:17:31 +09:00
meson.build Make xwayland support optional 2020-12-30 10:29:21 +00:00
node.h ssd: clean up scene management 2025-08-28 21:06:51 +01:00
osd.h tree-wide: use enum types/constants where appropriate 2025-08-28 01:33:23 +09:00
output-state.h output: remove ported wlr_output functions 2024-10-29 21:39:19 +00:00
output-virtual.h Add optional headless fallback output 2024-03-08 13:54:13 +01:00
output.h tree-wide: use enum types/constants where appropriate 2025-08-28 01:33:23 +09:00
overlay.h include: add config/types.h 2025-08-21 16:55:25 +09:00
placement.h view: honor automatic placement when adjusting floating geometry 2023-12-30 16:50:09 +00:00
regions.h overlay: add snap-to-edge overlay (PR #1652) 2024-04-05 04:35:31 +02:00
resistance.h interactive: allow moving horizontally/vertically maximized window 2024-08-26 20:30:22 +02:00
resize-indicator.h include: add config/types.h 2025-08-21 16:55:25 +09:00
resize-outlines.h Implement <resize><drawContents> 2024-06-15 21:17:01 +01:00
session-lock.h session-lock: restore focused view on unlock 2024-07-07 15:48:32 +09:00
snap-constraints.h common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
snap.h include: add config/types.h 2025-08-21 16:55:25 +09:00
ssd-internal.h ssd: clean up scene management 2025-08-28 21:06:51 +01:00
ssd.h ssd: clean up scene management 2025-08-28 21:06:51 +01:00
theme.h ssd: clean up scene management 2025-08-28 21:06:51 +01:00
view-impl-common.h xwayland: notify correct window stacking order to xwayland 2025-04-01 16:48:40 +09:00
view.h tree-wide: use enum types/constants where appropriate 2025-08-28 01:33:23 +09:00
window-rules.h tree-wide: use enum types/constants where appropriate 2025-08-28 01:33:23 +09:00
workspaces.h ext-workspace protocol integration 2024-12-23 04:14:53 +01:00
xwayland.h xwayland: handle rare case of focus_in event occurring before map 2025-06-12 20:33:25 +01:00