Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR performs extensive refactoring work as preliminary preparation for a control center feature. It centralizes state mutation methods, introduces new Wayland client-side protocol implementations, restructures logging, and adds various utility types.
Changes:
- Centralizes UI-affecting state mutations (colors, sizes, fonts, workspace settings) into
Statemethods, moving logic fromconfig/handler.rsintostate.rs - Adds numerous new
usr_ifs(user-side interface) implementations for Wayland protocols (keyboard, data device, XDG shell, cursor shape, dmabuf) and refactors existing ones to useGlobalName, trait-based callbacks, andRc<Self>receivers - Introduces
LogLevelenum (replacingCliLogLevel),LazyEventSource/LazyEventSources,AtomicEnum,StaticTexttrait, Oklab/Oklch color spaces, and movesgpu_alloc_ashtovulkan_core
Reviewed changes
Copilot reviewed 92 out of 93 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wl_usr/usr_ifs/usr_wl_keyboard.rs | New keyboard handler with keymap parsing, key/modifier event handling |
| src/wl_usr/usr_ifs/usr_zwp_linux_buffer_params_v1.rs | New dmabuf buffer params client-side implementation |
| src/wl_usr/usr_ifs/usr_zwp_linux_dmabuf_v1.rs | New linux-dmabuf client-side implementation |
| src/wl_usr/usr_ifs/usr_xdg_*.rs | New XDG shell client-side implementations (wm_base, surface, toplevel) |
| src/wl_usr/usr_ifs/usr_wp_cursor_shape_*.rs | New cursor shape client-side implementations |
| src/wl_usr/usr_ifs/usr_wl_data_*.rs | New data device/source/offer client-side implementations |
| src/wl_usr/usr_ifs/usr_wl_callback.rs | Refactored to use trait-based owner pattern |
| src/wl_usr/usr_ifs/usr_wl_surface.rs | frame() now returns the callback object |
| src/wl_usr/usr_ifs/usr_wl_pointer.rs | Trait methods now take Rc<Self>, cursor accepts Option |
| src/wl_usr/usr_ifs/usr_wl_seat.rs | Added get_keyboard method |
| src/wl_usr/usr_ifs/usr_wl_registry.rs | Changed to use GlobalName type; simplified bind API |
| src/wl_usr.rs | Extracted from_socket constructor; added OwnedFd import |
| src/wl_usr/usr_ifs.rs | Registered new module declarations |
| src/state.rs | Added pid, lazy_event_sources, XWayland client/display fields; centralized setter methods |
| src/compositor.rs | New LogLevel enum, MIN_SCALE/MAX_SCALE constants, lazy event handler spawn |
| src/logger.rs | Uses AtomicEnum<LogLevel> + separate filter for thread-safe log level |
| src/config/handler.rs | Delegates to new State methods; removes local visitor helpers |
| src/theme.rs | Added Oklab/Oklch color spaces, ThemeColor enum, StaticText impls |
| src/tree/toplevel.rs | Added property_changed_source for lazy event notifications |
| src/tree/output.rs | Changed VRR/tearing defaults; added set_flip_margin; head manager notifications |
| src/ifs/head_management.rs | Added blend_space, use_native_gamut, vrr_cursor_hz to HeadState; ReadOnlyHeadState |
| src/output_schedule.rs | Added head manager notification for cursor Hz changes |
| src/ifs/wp_cursor_shape_device_v1.rs | Extracted from_shape/to_shape methods on KnownCursor |
| src/ifs/wl_seat.rs | Added getter methods, PartialEq, input device setter wrappers |
| src/ifs/wl_output.rs | Added PartialEq implementation |
| src/ifs/jay_compositor.rs | Uses LogLevel::from_linear for log level setting |
| src/backend.rs | Added Linearize/StaticText to input types; direct_scanout_enabled/flip_margin to trait |
| src/utils/event_listener.rs | Added LazyEventSource/LazyEventSources; is_empty; new2 |
| src/utils/atomic_enum.rs | New AtomicEnum<T> for thread-safe enum storage |
| src/utils/static_text.rs | New StaticText trait for display names |
| src/vulkan_core/gpu_alloc_ash.rs | Moved from gfx_apis/vulkan/ |
| src/scale.rs | Renamed constants to SCALE_BASE/SCALE_BASEF (public) |
| src/kbvm.rs | Added map_text field; keymap_from_rmlvo helper |
| src/cli.rs, src/cli/*.rs | Updated to use LogLevel directly |
| src/portal*.rs | Updated to use GlobalName; adapted to new callback/registry APIs |
| build/vulkan*.rs, compile-shaders/* | Generalized shader compilation for multiple trees |
| src/client.rs | Added StaticText for ClientCapsEnum |
| src/criteria/clm*.rs | Added ClmMatchId for client ID matching |
| Other files | Minor adaptations for new APIs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
40bb720 to
9928da6
Compare
9928da6 to
e33350b
Compare
e33350b to
da484d5
Compare
da484d5 to
58d9b9b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 93 out of 94 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
58d9b9b to
fbd4e85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preliminary work for the control center