emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3219518 1/2: Fix 1 pixel wide border in frames on Haiku


From: Po Lu
Subject: master 3219518 1/2: Fix 1 pixel wide border in frames on Haiku
Date: Wed, 24 Nov 2021 04:40:28 -0500 (EST)

branch: master
commit 3219518e5c64281237bb604e6c2977f655aff238
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix 1 pixel wide border in frames on Haiku
    
    * src/haiku_support.cc (EmacsWindow.FrameResized): Add 1 to
    pixel widths.
    
    * src/haikuterm.c (haiku_read_socket): Use `lrint' to round
    widths.
---
 src/haiku_support.cc | 4 ++--
 src/haikuterm.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 5f9fe7e..9fb98f7 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -664,8 +664,8 @@ public:
   {
     struct haiku_resize_event rq;
     rq.window = this;
-    rq.px_heightf = newHeight;
-    rq.px_widthf = newWidth;
+    rq.px_heightf = newHeight + 1.0f;
+    rq.px_widthf = newWidth + 1.0f;
 
     haiku_write (FRAME_RESIZED, &rq);
     BDirectWindow::FrameResized (newWidth, newHeight);
diff --git a/src/haikuterm.c b/src/haikuterm.c
index be2b6c2..3e5b604 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -2626,8 +2626,8 @@ haiku_read_socket (struct terminal *terminal, struct 
input_event *hold_quit)
            if (!f)
              continue;
 
-           int width = (int) b->px_widthf;
-           int height = (int) b->px_heightf;
+           int width = lrint (b->px_widthf);
+           int height = lrint (b->px_heightf);
 
            BView_draw_lock (FRAME_HAIKU_VIEW (f));
            BView_resize_to (FRAME_HAIKU_VIEW (f), width, height);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]