[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6984f325bd: Fix specifying zero as a size for fonts on Haiku
From: |
Po Lu |
Subject: |
master 6984f325bd: Fix specifying zero as a size for fonts on Haiku |
Date: |
Sun, 1 May 2022 05:09:10 -0400 (EDT) |
branch: master
commit 6984f325bdbaf15b1190d0d03b01eebe9cfbbb71
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix specifying zero as a size for fonts on Haiku
* src/haiku_support.cc (MessageReceived): Set `size_specified'
correctly.
---
src/haiku_support.cc | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 67b7e143bf..9e31e1b870 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -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);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6984f325bd: Fix specifying zero as a size for fonts on Haiku,
Po Lu <=