Closed TimUntersberger closed 3 years ago
@ramirezmike I am currently trying to redraw all visible grids, but I can't find a way to do this.
this is how I am doing it right now.
"use_border" => set_prop!(use_border, bool, |old, new, _| {
if old != new {
state.each_window(|w| {
if new {
w.add_border()
} else {
w.remove_border()
}
}).unwrap();
state.config.use_border = new;
for d in &state.displays {
// this doesn't work
if let Some(g) = d.get_focused_grid() {
d.refresh_grid(&state.config).unwrap();
}
}
}
}),
This is the branch of a match statement. It basically modifies the window style of all managed windows based on the new value and then it should redraw the visible grids.
I'll try to take a closer look later tonight but you shouldn't need this part wrapping the call
if let Some(g) = d.get_focused_grid() {
}
because refresh_grid handles that. I don't think it would hurt but... it shouldn't be necessary. I would look to see if the display struct's focused_grid_id is not None.
is this waiting on something or can it be merged?
I don't really remember why I didn't merge this 🤔
Will merge this and hope I didn't forget about anything.
edge cases:
todo