-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
63 additions
and
2 deletions.
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
18 changes: 18 additions & 0 deletions
18
GlazeWM.Domain/Windows/CommandHandlers/RoundWindowBorderHandler.cs
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,18 @@ | ||
using GlazeWM.Domain.Windows.Commands; | ||
using GlazeWM.Infrastructure.Bussing; | ||
using GlazeWM.Infrastructure.WindowsApi; | ||
|
||
namespace GlazeWM.Domain.Windows.CommandHandlers | ||
{ | ||
internal sealed class RoundWindowBorderHandler: ICommandHandler<RoundWindowBorderCommand> | ||
{ | ||
public CommandResponse Handle(RoundWindowBorderCommand command) | ||
{ | ||
uint cornerPreference = 0x2; | ||
var target = command.TargetWindow; | ||
WindowsApiService.DwmSetWindowAttribute(target.Handle, 0x21,ref cornerPreference, sizeof(uint)); | ||
|
||
return CommandResponse.Ok; | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
GlazeWM.Domain/Windows/Commands/RoundWindowBorderCommand.cs
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,14 @@ | ||
using GlazeWM.Infrastructure.Bussing; | ||
|
||
namespace GlazeWM.Domain.Windows.Commands | ||
{ | ||
public class RoundWindowBorderCommand: Command | ||
{ | ||
public Window TargetWindow { get; } | ||
|
||
public RoundWindowBorderCommand(Window targetWindow) | ||
{ | ||
TargetWindow = targetWindow; | ||
} | ||
} | ||
} |