force re-assessment of sizes when changing font scaling
This commit is contained in:
1 parent
df8b415faa
commit
aef26084ef
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -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 {
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
@@ -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) };
|
||||
|
||||
Reference in new issue
Block a user