force re-assessment of sizes when changing font scaling

This commit is contained in:
Wez Furlong committed 2019-02-23 23:50:24 -08:00
1 parent df8b415faa
commit aef26084ef
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -395,7 +395,7 @@ impl GliumTerminalWindow {
let (width, height): (u32, u32) = size.to_physical(dpi_scale).into();
let width = width as u16;
let height = height as u16;
self.resize_surfaces(width, height)
self.resize_surfaces(width, height, false)
}
fn decode_modifiers(state: glium::glutin::ModifiersState) -> term::KeyModifiers {
+3 -3
View File
@@ -154,10 +154,10 @@ pub trait TerminalWindow {
Ok(tab_id)
}
fn resize_surfaces(&mut self, width: u16, height: u16) -> Result<bool, Error> {
fn resize_surfaces(&mut self, width: u16, height: u16, force: bool) -> Result<bool, Error> {
let dims = self.get_dimensions();
if width != dims.width || height != dims.height {
if force || width != dims.width || height != dims.height {
debug!("resize {},{}", width, height);
self.advise_renderer_of_resize(width, height)?;
@@ -213,7 +213,7 @@ pub trait TerminalWindow {
cell_height.ceil() as usize,
)?;
self.resize_surfaces(width, height)?;
self.resize_surfaces(width, height, true)?;
Ok(())
}
+1 -1
View File
@@ -352,7 +352,7 @@ impl X11TerminalWindow {
}
xcb::CONFIGURE_NOTIFY => {
let cfg: &xcb::ConfigureNotifyEvent = unsafe { xcb::cast_event(event) };
self.resize_surfaces(cfg.width(), cfg.height())?;
self.resize_surfaces(cfg.width(), cfg.height(), false)?;
}
xcb::KEY_PRESS => {
let key_press: &xcb::KeyPressEvent = unsafe { xcb::cast_event(event) };