labwc/src
John Lindgren f129571779 ssd: unify struct ssd_part with struct node_descriptor
struct ssd_part and struct node_descriptor seem to have essentially the
same purpose: tag a wlr_scene_node with some extra data indicating what
we're using it for.

Also, as with enum ssd_part_type (now lab_node_type), ssd_part is used
for several types of nodes that are not part of SSD.

So instead of the current chaining (node_descriptor -> ssd_part), let's
flatten/unify the two structs.

In detail:

- First, merge node_descriptor_type into lab_node_type.
- Add a separate view pointer in node_descriptor, since in the case of
  SSD buttons we need separate view and button data pointers.
- Rename ssd_part_button to simply ssd_button. It no longer contains
  an ssd_part as base.
- Add node_try_ssd_button_from_node() which replaces
  node_ssd_part_from_node() + button_try_from_ssd_part().
- Factor out ssd_button_free() to be called in node descriptor destroy.
- Finally, get_cursor_context() needs a little reorganization to handle
  the unified structs.

Overall, this simplifies the code a bit, and in my opinion makes it
easier to understand. No functional change intended.
2025-09-06 16:00:20 -04:00
..
common common: add node-type.c/h (renaming ssd_part_type to lab_node_type) 2025-09-06 16:00:20 -04:00
config common: add node-type.c/h (renaming ssd_part_type to lab_node_type) 2025-09-06 16:00:20 -04:00
decorations include: add config/types.h 2025-08-21 16:55:25 +09:00
foreign-toplevel foreign-toplevel: simplify and fully separate ext-foreign/wlr-foreign 2025-08-07 23:27:04 -04:00
img tree-wide: use enum types/constants where appropriate 2025-08-28 01:33:23 +09:00
input ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
menu ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
osd common: add node-type.c/h (renaming ssd_part_type to lab_node_type) 2025-09-06 16:00:20 -04:00
protocols src: include primary header first 2025-07-29 21:51:56 +01:00
scaled-buffer ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
ssd ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
action.c common: add node-type.c/h (renaming ssd_part_type to lab_node_type) 2025-09-06 16:00:20 -04:00
buffer.c src: include primary header first 2025-07-29 21:51:56 +01:00
debug.c overlay: refactor 2025-08-31 13:24:51 +01:00
desktop-entry.c include: add config/types.h 2025-08-21 16:55:25 +09:00
desktop.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
dnd.c include: add config/types.h 2025-08-21 16:55:25 +09:00
edges.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
idle.c src: include primary header first 2025-07-29 21:51:56 +01:00
interactive.c interactive: un-maximize only axes that are being resized 2025-09-01 20:44:09 +01:00
layers.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
magnifier.c include: add config/types.h 2025-08-21 16:55:25 +09:00
main.c include: add config/types.h 2025-08-21 16:55:25 +09:00
meson.build scaled-scene-buffer: restructure source files 2025-09-02 21:31:19 +01:00
node.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
output-state.c include: split output.h from labwc.h 2025-07-30 21:04:31 +01:00
output-virtual.c include: split output.h from labwc.h 2025-07-30 21:04:31 +01:00
output.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
overlay.c overlay: refactor 2025-08-31 13:24:51 +01:00
placement.c include: add config/types.h 2025-08-21 16:55:25 +09:00
regions.c overlay: refactor 2025-08-31 13:24:51 +01:00
resistance.c common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
resize-outlines.c overlay.h: reduce included headers 2025-08-31 13:24:51 +01:00
seat.c overlay: refactor 2025-08-31 13:24:51 +01:00
server.c ssd: eliminate ssd_hover_state (addressing a FIXME) 2025-09-06 16:00:20 -04:00
session-lock.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
snap-constraints.c common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
snap.c common: add node-type.c/h (renaming ssd_part_type to lab_node_type) 2025-09-06 16:00:20 -04:00
tearing.c include: reduce global includes in labwc.h 2025-07-30 21:04:31 +01:00
theme.c common: add node-type.c/h (renaming ssd_part_type to lab_node_type) 2025-09-06 16:00:20 -04:00
view-impl-common.c common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
view.c view.c: remove cruft in view_apply_maximized_geometry() 2025-09-05 03:41:21 +09:00
window-rules.c window-rules: fix window rules not being applied 2025-08-25 23:42:00 +09:00
workspaces.c overlay: refactor 2025-08-31 13:24:51 +01:00
xdg-popup.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
xdg.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
xwayland-unmanaged.c include: reduce global includes in labwc.h 2025-07-30 21:04:31 +01:00
xwayland.c ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00