-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix for #1671 saving window settings #1672
Conversation
we should not save settings from hidden windows. also should we respect cancellation
_window.SourceInitialized -= WindowSourceInitialized; | ||
_window = null; | ||
_settings = null; | ||
if (!e.Cancel) |
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 is unreliable and Cancel
will only be true if we're the last subscriber of the Closing
event. We should detach this in the Closed
event.
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.
agreed
- move deregistering events to closed event - handle minimized state changed, because hidden windows gets no window placements
Pulled this down and tried with Markdown Edit. Can confirm that it fixes my issue. Thanks. An aside: I did notice that the Title Bar text brush is Black instead of White. Might be an issue or just my build. |
@mike-ward the TitleBar text brush is taken from the accent colors (changed after 0.14), e.g. for <Color x:Key="IdealForegroundColor">Black</Color>
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{StaticResource IdealForegroundColor}" options:Freeze="True" /> you can set the window <SolidColorBrush x:Key="IdealForegroundColorBrush" Color="White" /> Another way is to create your own accent. |
fix for #1671 saving window settings
Closes #1671 SaveWindowPosition saves to position 0,0 if window not shown