ignore rescaling if the new scale is the same
This commit is contained in:
parent
e1785c7699
commit
6eb8cc5751
1 changed files with 3 additions and 5 deletions
8
mew.c
8
mew.c
|
@ -803,14 +803,12 @@ static void
|
||||||
surface_handle_preferred_scale(void *data,
|
surface_handle_preferred_scale(void *data,
|
||||||
struct wl_surface *wl_surface, int32_t factor)
|
struct wl_surface *wl_surface, int32_t factor)
|
||||||
{
|
{
|
||||||
|
if (scale == factor)
|
||||||
|
return;
|
||||||
scale = factor;
|
scale = factor;
|
||||||
loadfonts();
|
loadfonts();
|
||||||
|
|
||||||
/* FIXME:
|
/* the scale of the surface is only known after an initial draw, not before :( */
|
||||||
* Use a callback to ensure the 'configure' event
|
|
||||||
* is sent before the draw, which changes the dimensions
|
|
||||||
* properly for the update in scale.
|
|
||||||
*/
|
|
||||||
zwlr_layer_surface_v1_set_size(layer_surface, 0, mh / scale);
|
zwlr_layer_surface_v1_set_size(layer_surface, 0, mh / scale);
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue