-
Notifications
You must be signed in to change notification settings - Fork 420
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
Clean up IWindow
and remove platform-agnostic code probing ISDLWindow
#6438
Conversation
It's equivalent to `IsActive`.
Only implemented on Windows, and have no real use. ISDLWindow.Position can be used for the same purpose.
Moves those that were used in platform-agnostic code and tests.
fe74e25
to
f0824e2
Compare
Point windowLocation; | ||
|
||
switch (Host.Window.WindowMode.Value) | ||
{ | ||
case WindowMode.Windowed: | ||
windowLocation = Host.Window is ISDLWindow sdlWindow ? sdlWindow.Position : Point.Empty; | ||
break; | ||
|
||
default: | ||
windowLocation = Host.Window.CurrentDisplayBindable.Value.Bounds.Location; | ||
break; | ||
} |
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 think it's best to do this change in a separate PR and keep this PR as a completely code-quality change. I wouldn't be comfortable to merge this without seeing it being tested on all platforms we have (testing the fact that host.Window.Position = host.Window.CurrentDisplayBindable.Value.Bounds.Location
on non-windowed mode).
If we're obsoleting
Usually the CIs would've errored out if an obsolete member is being used somewhere, but it looks like applying the attribute to an interface member does not make that happen for some reason. The attribute should be copied to the class implementations as well in order to be effective. |
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 inner usage is fine, I would like to remove it just from the interface (and the base |
Sure, didn't notice the implementations were internal. |
Focused
,PointToClient()
andPointToScreen()
inIWindow
are made obsolete as they are not useful. See commits for more details.Moves some members from
ISDLWindow
toIWindow
. This makes it so platform-agnostic code no longer needs to cast toISDLWindow
(inUserInputManager
and tests).