]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Make the new ^< and ^> keystrokes add the class prefix.
authorSimon Tatham <anakin@pobox.com>
Wed, 16 Nov 2016 22:02:54 +0000 (22:02 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 16 Nov 2016 22:02:54 +0000 (22:02 +0000)
The new font name configured by the keystrokes was missing its
"client:" or "server:" prefix, which could have led to the selection
of the wrong font in rare situations.

unix/gtkfont.c

index 172475e702be39d901509367b1b36a30f6d5fd77..7e30355643e3a1921c34fec3bc87b93344f0ea19 100644 (file)
@@ -1259,8 +1259,13 @@ static char *x11font_size_increment(unifont *font, int increment)
 
 #undef FLIPPED_SIZE
 
-        if (xlfd_best)
-            returned_name = xlfd_recompose(xlfd_best);
+        if (xlfd_best) {
+            char *bare_returned_name = xlfd_recompose(xlfd_best);
+            returned_name = dupcat(
+                xfont->u.vt->prefix, ":", bare_returned_name,
+                (const char *)NULL);
+            sfree(bare_returned_name);
+        }
 
         XFreeFontNames(fontnames);
         sfree(xlfd);
@@ -2015,7 +2020,8 @@ static char *pangofont_size_increment(unifont *font, int increment)
     } else {
         pango_font_description_set_size(desc, size);
         newname = pango_font_description_to_string(desc);
-        retname = dupstr(newname);
+        retname = dupcat(pfont->u.vt->prefix, ":",
+                         newname, (const char *)NULL);
         g_free(newname);
     }