Skip to content

Commit 179e750

Browse files
committed
Make PointerTarget/KeyboardTarget object-safe; use in Anvil
I've been thinking about how to simplify this code for a while. Implementations of these traits become particularly verbose with a more complicated shell like cosmic-comp: https://github.com/pop-os/cosmic-comp/blob/master/src/shell/focus/target.rs. It turns out it can be made object-safe, so we can have a `&dyn PointerTarget`, if `PartialEq` and `Clone` requirements are moved out of the trait itself. I still wonder if it could be better to use enums for input events instead of a million methods. Anyway, something to think about.
1 parent e5f0068 commit 179e750

File tree

5 files changed

+70
-188
lines changed

5 files changed

+70
-188
lines changed

0 commit comments

Comments
 (0)