Add notification windowtype

This commit is contained in:
elkowar 2022-04-13 15:32:26 +02:00
parent aa54487c47
commit b3ac542e79
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
3 changed files with 6 additions and 0 deletions

View file

@ -17,6 +17,7 @@ All notable changes to eww will be listed here, starting at changes since versio
- Add `>=` and `<=` operators to simplexpr (By: viandoxdev) - Add `>=` and `<=` operators to simplexpr (By: viandoxdev)
- Add `desktop` window type (By: Alvaro Lopez) - Add `desktop` window type (By: Alvaro Lopez)
- Add `scroll` widget (By: viandoxdev) - Add `scroll` widget (By: viandoxdev)
- Add `notification` window type
### Notable Internal changes ### Notable Internal changes
- Rework state management completely, now making local state and dynamic widget hierarchy changes possible. - Rework state management completely, now making local state and dynamic widget hierarchy changes possible.

View file

@ -201,6 +201,7 @@ mod platform {
)? )?
.check()?; .check()?;
// TODO possibly support setting multiple window types
x11rb::wrapper::ConnectionExt::change_property32( x11rb::wrapper::ConnectionExt::change_property32(
&self.conn, &self.conn,
PropMode::REPLACE, PropMode::REPLACE,
@ -214,6 +215,7 @@ mod platform {
WindowType::Toolbar => self.atoms._NET_WM_WINDOW_TYPE_TOOLBAR, WindowType::Toolbar => self.atoms._NET_WM_WINDOW_TYPE_TOOLBAR,
WindowType::Utility => self.atoms._NET_WM_WINDOW_TYPE_UTILITY, WindowType::Utility => self.atoms._NET_WM_WINDOW_TYPE_UTILITY,
WindowType::Desktop => self.atoms._NET_WM_WINDOW_TYPE_DESKTOP, WindowType::Desktop => self.atoms._NET_WM_WINDOW_TYPE_DESKTOP,
WindowType::Notification => self.atoms._NET_WM_WINDOW_TYPE_NOTIFICATION,
}], }],
)? )?
.check()?; .check()?;
@ -231,6 +233,7 @@ mod platform {
_NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_TOOLBAR,
_NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_UTILITY,
_NET_WM_WINDOW_TYPE_DESKTOP, _NET_WM_WINDOW_TYPE_DESKTOP,
_NET_WM_WINDOW_TYPE_NOTIFICATION,
_NET_WM_STATE, _NET_WM_STATE,
_NET_WM_STATE_STICKY, _NET_WM_STATE_STICKY,
_NET_WM_STATE_ABOVE, _NET_WM_STATE_ABOVE,

View file

@ -48,6 +48,7 @@ mod backend {
Normal, Normal,
Utility, Utility,
Desktop, Desktop,
Notification,
} }
impl FromStr for WindowType { impl FromStr for WindowType {
type Err = EnumParseError; type Err = EnumParseError;
@ -60,6 +61,7 @@ mod backend {
"normal" => Self::Normal, "normal" => Self::Normal,
"utility" => Self::Utility, "utility" => Self::Utility,
"desktop" => Self::Desktop, "desktop" => Self::Desktop,
"notification" => Self::Notification,
} }
} }
} }