-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Added basic support for input_regions #111
Conversation
iced_layershell/src/multi_window.rs
Outdated
virtual_keyboard_manager.create_virtual_keyboard(seat, qh, ()); | ||
virtual_keyboard_in.keymap((*keymap_format).into(), file.as_fd(), *keymap_size); | ||
ev.set_virtual_keyboard(virtual_keyboard_in); | ||
let wl_compositor = globals.bind::<WlCompositor, _, _>(qh, 1..=1, ()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here can use expect, because wl_compositor should exist
iced_layershell/src/application.rs
Outdated
LayershellCustomActions::SetInputRegion(set_region) => { | ||
let window = ev.main_window(); | ||
|
||
if let Some(region) = &wl_input_region { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will exist after doing bind, so here can also use expect
Can you add an example for this new apo? |
iced_layershell/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i just create an examples folder and add this example there instead?, since i feel like readme should have a minimal example only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean add an examples folder and add this example instead. And it will be better to add comments in the place of this code
636857b
to
658ee39
Compare
I think it is already fine to be merged |
Now finally , you need to fix the clippy problem |
Yea, but we can't yet pass closures to set_input, unless it does not capture the environment variables (so are automatically converted to fn). which seems really useful, since without it the shapes have to be pretty much statically decided at compile time. to allow for it i would either need to
i cannot decide which one i should do |
@Decodetalkers does this look good 👀 ?? |
ok, I will merge it |
Attempts to solve #110
This creates an interface to dynamically set input region, which can be edited by user by means of a new action
I'm marking this as draft, any suggestions would be much appreciate since its my first time contributing here.
This also adds nessasory changes to to_layer_message macro, and to multi window mode.