mirror of
https://github.com/JakeStanger/ironbar.git
synced 2024-11-25 21:34:04 +03:00
Merge pull request #630 from JakeStanger/fix/launcher-focus
fix(launcher): apps with multiple windows stay focused when window closed
This commit is contained in:
commit
a93108b7e7
@ -49,6 +49,7 @@ impl ToplevelHandleData {
|
|||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct ToplevelHandleDataInner {
|
pub struct ToplevelHandleDataInner {
|
||||||
initial_done: bool,
|
initial_done: bool,
|
||||||
|
closed: bool,
|
||||||
output: Option<WlOutput>,
|
output: Option<WlOutput>,
|
||||||
|
|
||||||
current_info: Option<ToplevelInfo>,
|
current_info: Option<ToplevelInfo>,
|
||||||
@ -137,14 +138,17 @@ where
|
|||||||
}
|
}
|
||||||
Event::OutputEnter { output } => lock!(data.inner).output = Some(output),
|
Event::OutputEnter { output } => lock!(data.inner).output = Some(output),
|
||||||
Event::OutputLeave { output: _ } => lock!(data.inner).output = None,
|
Event::OutputLeave { output: _ } => lock!(data.inner).output = None,
|
||||||
Event::Closed => state.remove_handle(
|
Event::Closed => {
|
||||||
conn,
|
lock!(data.inner).closed = true;
|
||||||
qh,
|
state.remove_handle(
|
||||||
ToplevelHandle {
|
conn,
|
||||||
handle: handle.clone(),
|
qh,
|
||||||
},
|
ToplevelHandle {
|
||||||
),
|
handle: handle.clone(),
|
||||||
Event::Done => {
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Event::Done if !lock!(data.inner).closed => {
|
||||||
{
|
{
|
||||||
let pending_info = lock!(data.inner).pending_info.clone();
|
let pending_info = lock!(data.inner).pending_info.clone();
|
||||||
lock!(data.inner).current_info = Some(pending_info);
|
lock!(data.inner).current_info = Some(pending_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user