render: apply correct damage after bar-size changes
This commit is contained in:
parent
31747cef4a
commit
68f0966b16
2 changed files with 13 additions and 23 deletions
|
|
@ -8,14 +8,10 @@ use {
|
||||||
},
|
},
|
||||||
output_schedule::OutputSchedule,
|
output_schedule::OutputSchedule,
|
||||||
state::{ConnectorData, OutputData, State},
|
state::{ConnectorData, OutputData, State},
|
||||||
tree::{OutputNode, OutputRenderData, WsMoveConfig, move_ws_to_output},
|
tree::{OutputNode, WsMoveConfig, move_ws_to_output},
|
||||||
utils::{asyncevent::AsyncEvent, clonecell::CloneCell, hash_map_ext::HashMapExt},
|
utils::{asyncevent::AsyncEvent, clonecell::CloneCell, hash_map_ext::HashMapExt},
|
||||||
},
|
},
|
||||||
std::{
|
std::{cell::Cell, collections::VecDeque, rc::Rc},
|
||||||
cell::{Cell, RefCell},
|
|
||||||
collections::VecDeque,
|
|
||||||
rc::Rc,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn handle(state: &Rc<State>, connector: &Rc<dyn Connector>) {
|
pub fn handle(state: &Rc<State>, connector: &Rc<dyn Connector>) {
|
||||||
|
|
@ -166,15 +162,7 @@ impl ConnectorHandler {
|
||||||
workspace_rect: Default::default(),
|
workspace_rect: Default::default(),
|
||||||
non_exclusive_rect: Default::default(),
|
non_exclusive_rect: Default::default(),
|
||||||
non_exclusive_rect_rel: Default::default(),
|
non_exclusive_rect_rel: Default::default(),
|
||||||
render_data: RefCell::new(OutputRenderData {
|
render_data: Default::default(),
|
||||||
active_workspace: None,
|
|
||||||
underline: Default::default(),
|
|
||||||
inactive_workspaces: Default::default(),
|
|
||||||
attention_requested_workspaces: Default::default(),
|
|
||||||
captured_inactive_workspaces: Default::default(),
|
|
||||||
titles: Default::default(),
|
|
||||||
status: None,
|
|
||||||
}),
|
|
||||||
state: self.state.clone(),
|
state: self.state.clone(),
|
||||||
is_dummy: false,
|
is_dummy: false,
|
||||||
status: self.state.status.clone(),
|
status: self.state.status.clone(),
|
||||||
|
|
|
||||||
|
|
@ -594,15 +594,16 @@ impl OutputNode {
|
||||||
status.tex_x = pos;
|
status.tex_x = pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let old_full_area = rd.full_area;
|
||||||
|
rd.full_area = Rect::new_sized(
|
||||||
|
non_exclusive_rect.x1(),
|
||||||
|
non_exclusive_rect.y1(),
|
||||||
|
non_exclusive_rect.width(),
|
||||||
|
th + 1,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
if self.title_visible.get() {
|
if self.title_visible.get() {
|
||||||
let title_rect = Rect::new_sized(
|
self.state.damage(rd.full_area.union(old_full_area));
|
||||||
non_exclusive_rect.x1(),
|
|
||||||
non_exclusive_rect.y1(),
|
|
||||||
non_exclusive_rect.width(),
|
|
||||||
th,
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
self.state.damage(title_rect);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1246,6 +1247,7 @@ pub struct OutputWorkspaceRenderData {
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct OutputRenderData {
|
pub struct OutputRenderData {
|
||||||
|
pub full_area: Rect,
|
||||||
pub active_workspace: Option<OutputWorkspaceRenderData>,
|
pub active_workspace: Option<OutputWorkspaceRenderData>,
|
||||||
pub underline: Rect,
|
pub underline: Rect,
|
||||||
pub inactive_workspaces: Vec<Rect>,
|
pub inactive_workspaces: Vec<Rect>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue