window maximized issue
This commit is contained in:
@@ -7,7 +7,8 @@
|
|||||||
- mpv property `window-maximized` support added, cycling it from input.conf
|
- mpv property `window-maximized` support added, cycling it from input.conf
|
||||||
might not be 100% reliable, use native Windows shortcuts Win+Up, Win+Down
|
might not be 100% reliable, use native Windows shortcuts Win+Up, Win+Down
|
||||||
- the mpv.net `start-size` property supports `always` to always remember the window height
|
- the mpv.net `start-size` property supports `always` to always remember the window height
|
||||||
|
- if the window was maximized before fullscreen was entered, it's now set to
|
||||||
|
maximized after fullscreen was left (it was requested on the tracker)
|
||||||
|
|
||||||
### 5.4.4.2
|
### 5.4.4.2
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
using UI;
|
using UI;
|
||||||
using ScriptHost;
|
using ScriptHost;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
@@ -371,9 +370,6 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
if (WindowState != FormWindowState.Maximized || FormBorderStyle != FormBorderStyle.None)
|
if (WindowState != FormWindowState.Maximized || FormBorderStyle != FormBorderStyle.None)
|
||||||
{
|
{
|
||||||
if (WindowState == FormWindowState.Maximized)
|
|
||||||
WindowState = FormWindowState.Minimized;
|
|
||||||
|
|
||||||
FormBorderStyle = FormBorderStyle.None;
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
WindowState = FormWindowState.Maximized;
|
WindowState = FormWindowState.Maximized;
|
||||||
}
|
}
|
||||||
@@ -382,7 +378,10 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
if (WindowState == FormWindowState.Maximized && FormBorderStyle == FormBorderStyle.None)
|
if (WindowState == FormWindowState.Maximized && FormBorderStyle == FormBorderStyle.None)
|
||||||
{
|
{
|
||||||
WindowState = FormWindowState.Normal;
|
if (WasMaximized)
|
||||||
|
WindowState = FormWindowState.Maximized;
|
||||||
|
else
|
||||||
|
WindowState = FormWindowState.Normal;
|
||||||
|
|
||||||
if (mp.Border)
|
if (mp.Border)
|
||||||
FormBorderStyle = FormBorderStyle.Sizable;
|
FormBorderStyle = FormBorderStyle.Sizable;
|
||||||
@@ -701,8 +700,15 @@ namespace mpvnet
|
|||||||
|
|
||||||
if (mp.IsLogoVisible)
|
if (mp.IsLogoVisible)
|
||||||
mp.ShowLogo();
|
mp.ShowLogo();
|
||||||
|
|
||||||
|
if (WindowState == FormWindowState.Maximized && FormBorderStyle != FormBorderStyle.None)
|
||||||
|
WasMaximized = true;
|
||||||
|
else if (WindowState == FormWindowState.Normal && FormBorderStyle != FormBorderStyle.None)
|
||||||
|
WasMaximized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WasMaximized;
|
||||||
|
|
||||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFormClosing(e);
|
base.OnFormClosing(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user