mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
feat(wm): restrict border window to outline
This commit moves the border window drawing logic into the WNDPROC callback and uses BeginPaint -> Rectangle -> Endpaint to draw a rectangle around the outside of the window in a specific colour that is not black, which is used as the transparency colour with SetLayeredWindowAttributes. All of this results in a non-filled border rect and a much nicer experience for users who are using transparency or translucent effects on their windows. This commit also introduces an optional second active border colour when the user is focused on a stack of windows. If this is not set, the default colour for single windows will be used. Finally, a bunch of small issues relating to the border window staying drawn on the screen even when there are no active windows on a workspace have been addressed. resolve #201
This commit is contained in:
@@ -98,7 +98,7 @@ pub enum SocketMessage {
|
||||
WatchConfiguration(bool),
|
||||
CompleteConfiguration,
|
||||
ActiveWindowBorder(bool),
|
||||
ActiveWindowBorderColour(u32, u32, u32),
|
||||
ActiveWindowBorderColour(WindowKind, u32, u32, u32),
|
||||
InvisibleBorders(Rect),
|
||||
WorkAreaOffset(Rect),
|
||||
ResizeDelta(i32),
|
||||
@@ -134,6 +134,13 @@ impl FromStr for SocketMessage {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, Display, EnumString, ArgEnum, JsonSchema)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum WindowKind {
|
||||
Single,
|
||||
Stack,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, Display, EnumString, ArgEnum, JsonSchema)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum StateQuery {
|
||||
|
||||
Reference in New Issue
Block a user