mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-08-31 07:57:16 +02:00
feat(bar): support floating window title updates
This commit is contained in:
+1
-5
@@ -64,7 +64,6 @@ use crate::core::config_generation::IdWithIdentifier;
|
||||
use crate::core::config_generation::MatchingRule;
|
||||
use crate::core::config_generation::MatchingStrategy;
|
||||
use crate::core::config_generation::WorkspaceMatchingRule;
|
||||
use crate::winevent::WinEvent;
|
||||
use color_eyre::Result;
|
||||
use os_info::Version;
|
||||
use parking_lot::Mutex;
|
||||
@@ -309,10 +308,7 @@ pub fn notify_subscribers(notification: Notification, state_has_been_modified: b
|
||||
| NotificationEvent::Socket(SocketMessage::Theme(_))
|
||||
| NotificationEvent::Socket(SocketMessage::ReloadStaticConfiguration(_))
|
||||
| NotificationEvent::WindowManager(WindowManagerEvent::TitleUpdate(_, _))
|
||||
| NotificationEvent::WindowManager(WindowManagerEvent::Show(
|
||||
WinEvent::ObjectNameChange,
|
||||
_
|
||||
))
|
||||
| NotificationEvent::WindowManager(WindowManagerEvent::Show(_, _))
|
||||
);
|
||||
|
||||
let notification = &serde_json::to_string(¬ification)?;
|
||||
|
||||
@@ -363,6 +363,10 @@ impl Window {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn is_focused(self) -> bool {
|
||||
WindowsApi::foreground_window().unwrap_or_default() == self.hwnd
|
||||
}
|
||||
|
||||
pub fn transparent(self) -> Result<()> {
|
||||
let mut ex_style = self.ex_style()?;
|
||||
ex_style.insert(ExtendedWindowStyle::LAYERED);
|
||||
|
||||
Reference in New Issue
Block a user