Streamline code used to minimize the EVE Online main window
This commit is contained in:
@@ -363,23 +363,12 @@ namespace EveOPreview.UI
|
|||||||
private void ThumbnailDeactivated(IntPtr id)
|
private void ThumbnailDeactivated(IntPtr id)
|
||||||
{
|
{
|
||||||
IThumbnailView view;
|
IThumbnailView view;
|
||||||
this._thumbnailViews.TryGetValue(id, out view);
|
if (!this._thumbnailViews.TryGetValue(id, out view))
|
||||||
|
|
||||||
|
|
||||||
if (view?.Id == this._activeClientHandle)
|
|
||||||
{
|
{
|
||||||
WindowManagerNativeMethods.SendMessage(view.Id, WindowManagerNativeMethods.WM_SYSCOMMAND, WindowManagerNativeMethods.SC_MINIMIZE, 0);
|
return;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int style = WindowManagerNativeMethods.GetWindowLong(id, WindowManagerNativeMethods.GWL_STYLE);
|
|
||||||
// If the window is not already minimized then minimize it
|
|
||||||
if ((style & WindowManagerNativeMethods.WS_MINIMIZE) != WindowManagerNativeMethods.WS_MINIMIZE)
|
|
||||||
{
|
|
||||||
WindowManagerNativeMethods.ShowWindowAsync(id, WindowManagerNativeMethods.SW_SHOWMINIMIZED);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WindowManagerNativeMethods.SendMessage(view.Id, WindowManagerNativeMethods.WM_SYSCOMMAND, WindowManagerNativeMethods.SC_MINIMIZE, 0);
|
||||||
this.RefreshThumbnails();
|
this.RefreshThumbnails();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user