mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-11 15:42:43 +02:00
fix(bar): add focus-monitor-at-cursor msg to buttons
This commit adds the FocusMonitorAtCursor SocketMessage on all the toggle buttons as the monitor idx is not sent as a parameter and the monitor needs to be focused when these buttons are clicked on the bar (especially for multiple bars).
This commit is contained in:
@@ -403,6 +403,7 @@ impl BarWidget for Komorebi {
|
|||||||
|
|
||||||
if layer_frame.clicked()
|
if layer_frame.clicked()
|
||||||
&& komorebi_client::send_batch([
|
&& komorebi_client::send_batch([
|
||||||
|
SocketMessage::FocusMonitorAtCursor,
|
||||||
SocketMessage::MouseFollowsFocus(false),
|
SocketMessage::MouseFollowsFocus(false),
|
||||||
SocketMessage::ToggleWorkspaceLayer,
|
SocketMessage::ToggleWorkspaceLayer,
|
||||||
SocketMessage::MouseFollowsFocus(
|
SocketMessage::MouseFollowsFocus(
|
||||||
|
|||||||
@@ -105,12 +105,22 @@ impl KomorebiLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
KomorebiLayout::Monocle => {
|
KomorebiLayout::Monocle => {
|
||||||
if komorebi_client::send_message(&SocketMessage::ToggleMonocle).is_err() {
|
if komorebi_client::send_batch([
|
||||||
|
SocketMessage::FocusMonitorAtCursor,
|
||||||
|
SocketMessage::ToggleMonocle,
|
||||||
|
])
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
tracing::error!("could not send message to komorebi: ToggleMonocle");
|
tracing::error!("could not send message to komorebi: ToggleMonocle");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KomorebiLayout::Floating => {
|
KomorebiLayout::Floating => {
|
||||||
if komorebi_client::send_message(&SocketMessage::ToggleTiling).is_err() {
|
if komorebi_client::send_batch([
|
||||||
|
SocketMessage::FocusMonitorAtCursor,
|
||||||
|
SocketMessage::ToggleTiling,
|
||||||
|
])
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
tracing::error!("could not send message to komorebi: ToggleTiling");
|
tracing::error!("could not send message to komorebi: ToggleTiling");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user