Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a layershellexample #619

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Decodetalkers
Copy link
Contributor

I found that layershell is very similar with xdg, so I want to add one example of layershell with origin wayland-rs..because the are so similar

@Decodetalkers Decodetalkers force-pushed the layershellexample branch 2 times, most recently from 38472df to 97b431c Compare April 28, 2023 01:57
Comment on lines 106 to 117
impl Dispatch<wl_compositor::WlCompositor, ()> for State {
fn event(
_: &mut Self,
_: &wl_compositor::WlCompositor,
_: wl_compositor::Event,
_: &(),
_: &Connection,
_: &QueueHandle<Self>,
) {
// wl_compositor has no event
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to use delegate_noop! here instead?

Suggested change
impl Dispatch<wl_compositor::WlCompositor, ()> for State {
fn event(
_: &mut Self,
_: &wl_compositor::WlCompositor,
_: wl_compositor::Event,
_: &(),
_: &Connection,
_: &QueueHandle<Self>,
) {
// wl_compositor has no event
}
}
delegate_noop!(State: wl_compositor::WlCompositor);

Since this is an example, let's use the approach that's simplest for other to follow :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I want it be the same as xdg-shell, emm, to show they are similar

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be best to update that example to use delegate_noop! too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done

@Eclextic
Copy link

I just wanted to say, thank you very much for this example! It has really helped me out and guided me! Why exactly has it not yet been merged?? This is gold!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants