Udata *Data types wrap user provided U instead of having a *DataExt trait#524
Draft
ids1024 wants to merge 2 commits into
Draft
Udata *Data types wrap user provided U instead of having a *DataExt trait#524ids1024 wants to merge 2 commits into
*Data types wrap user provided U instead of having a *DataExt trait#524ids1024 wants to merge 2 commits into
Conversation
Presumably the type argument for the `LoopHandle` is expected to match the the `D` type used for wayland-rs dispatch? Unless the calloop event loop isn't being used to dispatch Wayland events. Without `keyboard:` specified in `delegate_keyboard!`, this did use `KeyboardData<$ty>`, so in that case these are assumed to match.
a2aad61 to
31f09f6
Compare
WIP surface udata fix macro macro WIP pointer macro WIP DataSourceData macro did earlier version not actually provide any way to implement dispatch for custom type here? constructor and accessors pub constructors touch WIP activation not compiling types in example? should be fine to get rid of trait and just rely on immutable wrapper struct. WIP don't make `delegate_activation!` generic Not compiling... can that work? see how that works with new wayland-rs. input method should fix custom data types previously was seemingly broken for delegating dispatch, constructing with custom data, or commit() aaccessing `.data` input-method-v3
Member
Author
|
Changing the |
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.
For #519, we need to remove the
*DataExttraits, and instead make*DatawrapUso we can provide blanket implementations of the futurewayland_client::DispatchThis probably doesn't need to be merged before #519, which can then be based on this, but it seems good to keep these changes in clean separate commits, and verify everything works here. May as well have a draft PR before this part is done.
The various
get_keyboard_*methods are made a bit more redundant in implementation here, but maybe they could now use a builder pattern.This is a breaking change to code that uses
.data::<...>to get the udata, since the type has changed. Though maybe it would be best to replace use of that with helperfrom_resource()methods as smithay has for a couple things.