Redraw when needed and context menu in input fields (#896)
Selection changes, scrolling and hyperlink highlights all just flag the terminal as dirty. Without asking for a redraw they would not show up until something else happens to repaint the window. This becomes a problem after iced PR below gets merged. Depends on - [x] https://github.com/pop-os/iced/pull/377 - [x] https://github.com/pop-os/libcosmic/pull/1382 - [x] https://github.com/pop-os/libcosmic/pull/1388 - [x] https://github.com/pop-os/cosmic-files/pull/1815 ____ - [x] I have disclosed use of any AI generated code in my commit messages. - If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR. - In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment. - [x] I understand these changes in full and will be able to respond to review comments. - [x] My change is accurately described in the commit message. - [x] My contribution is tested and working as described. - [x] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions.
This commit is contained in:
commit
ad9a5bcc40
3 changed files with 168 additions and 196 deletions
356
Cargo.lock
generated
356
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -196,7 +196,7 @@ impl TerminalPaneGrid {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn unfocus_all_terminals(&self) {
|
pub fn unfocus_all_terminals(&self) {
|
||||||
for (_pane, tab_model) in self.panes.panes.iter() {
|
for tab_model in self.panes.panes.values() {
|
||||||
let entity = tab_model.active();
|
let entity = tab_model.active();
|
||||||
if let Some(terminal) = tab_model.data::<Mutex<Terminal>>(entity) {
|
if let Some(terminal) = tab_model.data::<Mutex<Terminal>>(entity) {
|
||||||
let mut terminal = terminal.lock().unwrap();
|
let mut terminal = terminal.lock().unwrap();
|
||||||
|
|
|
||||||
|
|
@ -543,7 +543,7 @@ where
|
||||||
fn fill<Renderer: renderer::Renderer>(
|
fn fill<Renderer: renderer::Renderer>(
|
||||||
&mut self,
|
&mut self,
|
||||||
renderer: &mut Renderer,
|
renderer: &mut Renderer,
|
||||||
is_focused: bool,
|
_is_focused: bool,
|
||||||
) {
|
) {
|
||||||
let cosmic_text_to_iced_color = |color: cosmic_text::Color| {
|
let cosmic_text_to_iced_color = |color: cosmic_text::Color| {
|
||||||
Color::from_rgba(
|
Color::from_rgba(
|
||||||
|
|
@ -1615,6 +1615,10 @@ where
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if terminal.needs_update {
|
||||||
|
shell.request_redraw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue