Split out Surface from Window, take 2#4264
Split out Surface from Window, take 2#4264jgcodes2020 wants to merge 18 commits intorust-windowing:masterfrom
Surface from Window, take 2#4264Conversation
kchibisov
left a comment
There was a problem hiding this comment.
I'm not sure about the cursor part of the API yet, those should likely end up platform specific.
I think the option to get size should be present, not sure about the option to set request a size change, but I think it's also generally available.
Monitor stuff I'd also drop, except for current_monitor. Like the rest doesn't really make much sense and just are carried from old winit. pre_present_notify is fine.
For downcasting, I'd do the same as macos_handler, though, the backend itself will implement the cast if it makes sense.
In general, that can be emulated on platforms where it's not possible, like Wayland, just by setting the e.g. what to include in the event, etc. I'd leave this for the future discussions when we'd come to adding subsurfaces. |
af90276 to
9d5f4ff
Compare
9d5f4ff to
9b49b5b
Compare
|
@kchibisov mind taking a look at this? |
|
I'm not sure much got addressed from what I've requested before, e.g. wrt to cursor APIs, etc. We've also discussed with other maintainers the state of this and inclined to go with it after a batch of 0.31 changes, since we were not entirely sure what should be in |
|
Should be worth mentioning #3928 here (so that others can find it via that issue too) which describes how to implement this For my use-case having a generic subsurface implementation in EDIT: Note that the linked issue doesn't mention nor compare Android, which is a popular backend of |
changelogmodule if knowledge of this change could be valuable to usersUpdated version of #3942 (split out
SurfacefromWindow) with the backend split in place. This is needed to implement popups and subsurfaces, as their behaviours do not match.Remaining questions
Surface?Surfacebe handled? I've included a really primitive solution, but there could be better ways.