Skip to content

Commit 7b283a2

Browse files
committed
remove DWM, it does not skip the animations
1 parent bf7b6c2 commit 7b283a2

2 files changed

Lines changed: 0 additions & 72 deletions

File tree

FlashpointSecurePlayer/Shared.cs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -317,40 +317,6 @@ public struct MSLLHOOKSTRUCT {
317317
[return: MarshalAs(UnmanagedType.Bool)]
318318
public static extern bool UnhookWindowsHookEx(IntPtr hhk);
319319

320-
public enum DWMWINDOWATTRIBUTE : uint {
321-
DWMWA_NCRENDERING_ENABLED = 1,
322-
DWMWA_NCRENDERING_POLICY,
323-
DWMWA_TRANSITIONS_FORCEDISABLED,
324-
DWMWA_ALLOW_NCPAINT,
325-
DWMWA_CAPTION_BUTTON_BOUNDS,
326-
DWMWA_NONCLIENT_RTL_LAYOUT,
327-
DWMWA_FORCE_ICONIC_REPRESENTATION,
328-
DWMWA_FLIP3D_POLICY,
329-
DWMWA_EXTENDED_FRAME_BOUNDS,
330-
DWMWA_HAS_ICONIC_BITMAP,
331-
DWMWA_DISALLOW_PEEK,
332-
DWMWA_EXCLUDED_FROM_PEEK,
333-
DWMWA_CLOAK,
334-
DWMWA_CLOAKED,
335-
DWMWA_FREEZE_REPRESENTATION,
336-
DWMWA_PASSIVE_UPDATE_MODE,
337-
DWMWA_USE_HOSTBACKDROPBRUSH,
338-
DWMWA_USE_IMMERSIVE_DARK_MODE = 20,
339-
DWMWA_WINDOW_CORNER_PREFERENCE = 33,
340-
DWMWA_BORDER_COLOR,
341-
DWMWA_CAPTION_COLOR,
342-
DWMWA_TEXT_COLOR,
343-
DWMWA_VISIBLE_FRAME_BORDER_THICKNESS,
344-
DWMWA_SYSTEMBACKDROP_TYPE,
345-
DWMWA_LAST
346-
}
347-
348-
[DllImport("DWMAPI.DLL")]
349-
public static extern int DwmGetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, out int pvAttribute, uint cbAttribute);
350-
351-
[DllImport("DWMAPI.DLL")]
352-
public static extern int DwmSetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, ref int pvAttribute, uint cbAttribute);
353-
354320
[StructLayout(LayoutKind.Sequential)]
355321
public struct SECURITY_ATTRIBUTES {
356322
public uint nLength;

FlashpointSecurePlayer/WebBrowserMode.cs

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,6 @@ private IntPtr LowLevelMouseProc(int nCode, IntPtr wParam, IntPtr lParam) {
5656
return CallNextHookEx(mouseHook, nCode, wParam, lParam);
5757
}
5858

59-
private bool TransitionsForceDisabled {
60-
get {
61-
int attributeValue = 0;
62-
63-
int err = DwmGetWindowAttribute(Handle, DWMWINDOWATTRIBUTE.DWMWA_TRANSITIONS_FORCEDISABLED, out attributeValue, (uint)Marshal.SizeOf(typeof(int)));
64-
65-
if (err != S_OK) {
66-
Marshal.ThrowExceptionForHR(err);
67-
}
68-
return (attributeValue != 0) ? true : false;
69-
}
70-
71-
set {
72-
int attributeValue = value ? 1 : 0;
73-
74-
int err = DwmSetWindowAttribute(Handle, DWMWINDOWATTRIBUTE.DWMWA_TRANSITIONS_FORCEDISABLED, ref attributeValue, (uint)Marshal.SizeOf(typeof(int)));
75-
76-
if (err != S_OK) {
77-
Marshal.ThrowExceptionForHR(err);
78-
}
79-
}
80-
}
81-
8259
private const int FULLSCREEN_EXIT_LABEL_TIMER_TIME = 2500;
8360

8461
private System.Windows.Forms.Timer exitFullscreenLabelTimer = null;
@@ -108,7 +85,6 @@ private bool ExitFullscreenLabelTimer {
10885
}
10986

11087
private bool fullscreen = false;
111-
private bool fullscreenTransitionsForceDisabled = false;
11288
private FormBorderStyle fullscreenFormBorderStyle = FormBorderStyle.Sizable;
11389
private FormWindowState fullscreenWindowState = FormWindowState.Maximized;
11490
private Point fullscreenLocation;
@@ -146,14 +122,6 @@ public bool Fullscreen {
146122
closableWebBrowserLocation = closableWebBrowser.Location;
147123
closableWebBrowserSize = closableWebBrowser.Size;
148124

149-
try {
150-
fullscreenTransitionsForceDisabled = TransitionsForceDisabled;
151-
TransitionsForceDisabled = true;
152-
} catch {
153-
// no Aero!
154-
fullscreenTransitionsForceDisabled = false;
155-
}
156-
157125
// need to do this first to have an effect if starting maximized
158126
WindowState = FormWindowState.Normal;
159127
// disable resizing
@@ -211,12 +179,6 @@ public bool Fullscreen {
211179

212180
// commit by bringing the window to the front
213181
BringToFront();
214-
215-
try {
216-
TransitionsForceDisabled = fullscreenTransitionsForceDisabled;
217-
} catch {
218-
// no Aero!
219-
}
220182
}
221183
}
222184
}

0 commit comments

Comments
 (0)