Closed ganeshrvel closed 11 months ago
@Adrian-Samoticha what are your thoughts on this? Do we want to route more of MWU through MUI, or would you rather folks use MWU directly?
@Adrian-Samoticha what are your thoughts on this? Do we want to route more of MWU through MUI, or would you rather folks use MWU directly?
Frankly, I do like this proposal. I think since we’re already routing MWU calls through MUI it probably doesn’t hurt to expand on that. However, I’d argue that we should go all the way and expose all NSWindowDelegate
callbacks in that case.
Furthermore, I’d argue that using VoidCallback
here isn’t ideal, since that means that you can only define a single function for each callback. I’d suggest we instead define a sort of “window event stream” which emits an enum corresponding to each NSWindowDelegate
method whenever an event is triggered.
I agree @Adrian-Samoticha. @ganeshrvel, can you please make the proposed changes?
@ganeshrvel I am closing this due to inactivity. Please feel free to reopen when you are ready to make the requested changes.
This PR proposes exposing several NSWindow event callbacks, such as
onWindowDidBecomeMain
,onWindowDidResignMain
,onWindowDidBecomeKey
,onWindowDidResignKey
,onWindowDidChangeScreen
,onWindowDidMove
, andonWindowDidResize
, to allow developers to leverage and customize window behavior better.Pre-launch Checklist
CHANGELOG.md
with my changes