Commit graph

9 commits

Author SHA1 Message Date
tokyo4j
4fcb873f6f Use "cycle" instead of "osd" across the codebase
We were using the word "osd" to describe the window switcher, but it can
be used with on-screen display (OSD) disabled by
`<windowSwitcher><osd show="false">`. Let's use "cycle" instead to avoid
confusion.
2025-11-30 16:20:16 +09:00
John Lindgren
e96f4a032b output: avoid use of wlr_scene_output.WLR_PRIVATE.index
We were only using it to allow quick bitset comparisons of sets of
outputs (such as view->outputs). We can maintain our own bit IDs for
this purpose and avoid using the private wlroots field.

Note: from my reading of wlr_scene_output_create(), it appears to
always take the lowest unused index, resulting in aggressive re-use of
index values when outputs are disconnected and reconnected. I've tried
to make re-use as infrequent as possible. This could theoretically
reduce the chance of a mix-up in view_update_outputs(), although I'm
not aware of any practical scenario where it matters.

v2: prevent adding more than 64 outputs
2025-11-26 06:49:17 +01:00
John Lindgren
87da3f6588 output: factor out output_set_has_fullscreen_view() 2025-11-09 06:46:59 +01:00
tokyo4j
00f0a46ef7 osd: generalize osd_{classic,thumbnail}_item
This allows us to share common codes for dealing with osd items.
For example:
- Get the clicked osd item to focus its associated window
- Scroll the items when their total height is taller than output height
2025-11-04 21:29:13 +00:00
Johan Malm
2ea0f6fff4 Privatize output_manager_init() 2025-09-29 20:22:46 +01:00
Johan Malm
139a5f0383 Remove unused function output_max_scale() 2025-09-26 10:41:21 -04:00
John Lindgren
80b28f16c7 tree-wide: use enum types/constants where appropriate
- add LAB_WINDOW_TYPE_INVALID in place of literal -1
- document more clearly that enum lab_view_criteria is a bitset
- other one-off replacements of integer values/types for consistency

Note: variables of type enum lab_view_criteria are already used
extensively throughout the code to contain combinations of the declared
enum values. I am not introducing any new usage here, just changing the
single uint32_t to be consistent with all the other usages.
2025-08-28 01:33:23 +09:00
John Lindgren
9d49d19cd2 include: add config/types.h 2025-08-21 16:55:25 +09:00
John Lindgren
e21fc065c4 include: split output.h from labwc.h 2025-07-30 21:04:31 +01:00