mirror of
https://github.com/mintycube/st.git
synced 2024-10-22 14:05:49 +02:00
sixel: scale images on both screens when zooming in/out (#141)
This fixes an issue where images on the main screen don't scale when you increase or decrease the font size on the alt screen.
This commit is contained in:
parent
a414f4a707
commit
546dd288c0
7
x.c
7
x.c
@ -318,6 +318,7 @@ void
|
|||||||
zoomabs(const Arg *arg)
|
zoomabs(const Arg *arg)
|
||||||
{
|
{
|
||||||
#if SIXEL_PATCH
|
#if SIXEL_PATCH
|
||||||
|
int i;
|
||||||
ImageList *im;
|
ImageList *im;
|
||||||
#endif // SIXEL_PATCH
|
#endif // SIXEL_PATCH
|
||||||
|
|
||||||
@ -328,8 +329,9 @@ zoomabs(const Arg *arg)
|
|||||||
#endif // FONT2_PATCH
|
#endif // FONT2_PATCH
|
||||||
|
|
||||||
#if SIXEL_PATCH
|
#if SIXEL_PATCH
|
||||||
/* deleting old pixmaps forces the new scaled pixmaps to be created */
|
/* delete old pixmaps so that xfinishdraw() can create new scaled ones */
|
||||||
for (im = term.images; im; im = im->next) {
|
for (im = term.images, i = 0; i < 2; i++, im = term.images_alt) {
|
||||||
|
for (; im; im = im->next) {
|
||||||
if (im->pixmap)
|
if (im->pixmap)
|
||||||
XFreePixmap(xw.dpy, (Drawable)im->pixmap);
|
XFreePixmap(xw.dpy, (Drawable)im->pixmap);
|
||||||
if (im->clipmask)
|
if (im->clipmask)
|
||||||
@ -337,6 +339,7 @@ zoomabs(const Arg *arg)
|
|||||||
im->pixmap = NULL;
|
im->pixmap = NULL;
|
||||||
im->clipmask = NULL;
|
im->clipmask = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // SIXEL_PATCH
|
#endif // SIXEL_PATCH
|
||||||
|
|
||||||
cresize(0, 0);
|
cresize(0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user