forked from glzr-io/glazewm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: option to disable window transition animations (glzr-io#389)
- Loading branch information
1 parent
6ec79d2
commit d675244
Showing
7 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace GlazeWM.Domain.UserConfigs | ||
{ | ||
public enum WindowAnimations | ||
{ | ||
Unchanged, | ||
True, | ||
False | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using static GlazeWM.Infrastructure.WindowsApi.WindowsApiService; | ||
|
||
namespace GlazeWM.Infrastructure.WindowsApi | ||
{ | ||
public static class SystemSettings | ||
{ | ||
/// <summary> | ||
/// Modify global setting for whether window transition animations are enabled. | ||
/// </summary> | ||
public static void SetWindowAnimationsEnabled(bool enabled) | ||
{ | ||
var animationInfo = AnimationInfo.Create(enabled); | ||
|
||
SystemParametersInfo( | ||
SystemParametersInfoFlags.SetAnimation, | ||
animationInfo.CallbackSize, | ||
ref animationInfo, | ||
0 | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters