]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 1 pixel wide border in frames on Haiku
authorPo Lu <luangruo@yahoo.com>
Wed, 24 Nov 2021 09:38:26 +0000 (09:38 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 24 Nov 2021 09:38:26 +0000 (09:38 +0000)
* 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
src/haikuterm.c

index 5f9fe7e234fb703f8f84b9f62c4b2c54ef06974b..9fb98f70814f3ed0c39f6b9d538c42b24ae1f6c9 100644 (file)
@@ -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);
index be2b6c2491faa7f3e43412bc0b3096d8ebeb3d4d..3e5b6046f6d3e998b95be764a5aba9d967def413 100644 (file)
@@ -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);