mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 22:51:21 +02:00
handling grouping edge case for komorebi focus window
This commit is contained in:
@@ -129,6 +129,7 @@ impl BarWidget for Komorebi {
|
||||
if self.workspaces.enable {
|
||||
let mut update = None;
|
||||
|
||||
// NOTE: There should always be at least one workspace.
|
||||
config.grouping.apply_on_widget(ui, |ui| {
|
||||
for (i, (ws, should_show)) in
|
||||
komorebi_notification_state.workspaces.iter().enumerate()
|
||||
@@ -308,8 +309,10 @@ impl BarWidget for Komorebi {
|
||||
|
||||
if let Some(focused_window) = self.focused_window {
|
||||
if focused_window.enable {
|
||||
config.grouping.apply_on_widget(ui, |ui| {
|
||||
let titles = &komorebi_notification_state.focused_container_information.0;
|
||||
|
||||
if !titles.is_empty() {
|
||||
config.grouping.apply_on_widget(ui, |ui| {
|
||||
let icons = &komorebi_notification_state.focused_container_information.1;
|
||||
let focused_window_idx =
|
||||
komorebi_notification_state.focused_container_information.2;
|
||||
@@ -382,9 +385,9 @@ impl BarWidget for Komorebi {
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
if komorebi_client::send_message(&SocketMessage::MouseFollowsFocus(
|
||||
false,
|
||||
))
|
||||
if komorebi_client::send_message(
|
||||
&SocketMessage::MouseFollowsFocus(false),
|
||||
)
|
||||
.is_err()
|
||||
{
|
||||
tracing::error!(
|
||||
@@ -392,9 +395,9 @@ impl BarWidget for Komorebi {
|
||||
);
|
||||
}
|
||||
|
||||
if komorebi_client::send_message(&SocketMessage::FocusStackWindow(
|
||||
i,
|
||||
))
|
||||
if komorebi_client::send_message(
|
||||
&SocketMessage::FocusStackWindow(i),
|
||||
)
|
||||
.is_err()
|
||||
{
|
||||
tracing::error!(
|
||||
@@ -402,9 +405,11 @@ impl BarWidget for Komorebi {
|
||||
);
|
||||
}
|
||||
|
||||
if komorebi_client::send_message(&SocketMessage::MouseFollowsFocus(
|
||||
if komorebi_client::send_message(
|
||||
&SocketMessage::MouseFollowsFocus(
|
||||
komorebi_notification_state.mouse_follows_focus,
|
||||
))
|
||||
),
|
||||
)
|
||||
.is_err()
|
||||
{
|
||||
tracing::error!(
|
||||
@@ -418,6 +423,7 @@ impl BarWidget for Komorebi {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ui.add_space(WIDGET_SPACING);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user