]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix specifying zero as a size for fonts on Haiku
authorPo Lu <luangruo@yahoo.com>
Sun, 1 May 2022 09:08:33 +0000 (09:08 +0000)
committerPo Lu <luangruo@yahoo.com>
Sun, 1 May 2022 09:08:33 +0000 (09:08 +0000)
* src/haiku_support.cc (MessageReceived): Set `size_specified'
correctly.

src/haiku_support.cc

index 67b7e143bfbe3e2ac67f22104a189ad0a851469c..9e31e1b870f844d0820e9724e9e864882316eab5 100644 (file)
@@ -2519,15 +2519,13 @@ class EmacsFontSelectionDialog : public BWindow
     else if (msg->what == B_OK
             && font_style_pane.CurrentSelection () >= 0)
       {
+       text = size_entry.Text ();
+
        rq.cancel = false;
        rq.family_idx = font_family_pane.CurrentSelection ();
        rq.style_idx = font_style_pane.CurrentSelection ();
-
-       text = size_entry.Text ();
        rq.size = atoi (text);
-
-       if (rq.size > 0)
-         rq.size_specified = true;
+       rq.size_specified = rq.size > 0 || strlen (text);
 
        write_port (comm_port, 0, &rq, sizeof rq);
       }