diff options
| author | Po Lu | 2021-11-24 09:38:26 +0000 |
|---|---|---|
| committer | Po Lu | 2021-11-24 09:38:26 +0000 |
| commit | 3219518e5c64281237bb604e6c2977f655aff238 (patch) | |
| tree | c55a6dd8815132ec44068e9b6b3f99747b2f8e39 /src | |
| parent | d112c75f53c690e6f13ec3b340dbc384425bb04d (diff) | |
| download | emacs-3219518e5c64281237bb604e6c2977f655aff238.tar.gz emacs-3219518e5c64281237bb604e6c2977f655aff238.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haiku_support.cc | 4 | ||||
| -rw-r--r-- | src/haikuterm.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 5f9fe7e234f..9fb98f70814 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc | |||
| @@ -664,8 +664,8 @@ public: | |||
| 664 | { | 664 | { |
| 665 | struct haiku_resize_event rq; | 665 | struct haiku_resize_event rq; |
| 666 | rq.window = this; | 666 | rq.window = this; |
| 667 | rq.px_heightf = newHeight; | 667 | rq.px_heightf = newHeight + 1.0f; |
| 668 | rq.px_widthf = newWidth; | 668 | rq.px_widthf = newWidth + 1.0f; |
| 669 | 669 | ||
| 670 | haiku_write (FRAME_RESIZED, &rq); | 670 | haiku_write (FRAME_RESIZED, &rq); |
| 671 | BDirectWindow::FrameResized (newWidth, newHeight); | 671 | BDirectWindow::FrameResized (newWidth, newHeight); |
diff --git a/src/haikuterm.c b/src/haikuterm.c index be2b6c2491f..3e5b6046f6d 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c | |||
| @@ -2626,8 +2626,8 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) | |||
| 2626 | if (!f) | 2626 | if (!f) |
| 2627 | continue; | 2627 | continue; |
| 2628 | 2628 | ||
| 2629 | int width = (int) b->px_widthf; | 2629 | int width = lrint (b->px_widthf); |
| 2630 | int height = (int) b->px_heightf; | 2630 | int height = lrint (b->px_heightf); |
| 2631 | 2631 | ||
| 2632 | BView_draw_lock (FRAME_HAIKU_VIEW (f)); | 2632 | BView_draw_lock (FRAME_HAIKU_VIEW (f)); |
| 2633 | BView_resize_to (FRAME_HAIKU_VIEW (f), width, height); | 2633 | BView_resize_to (FRAME_HAIKU_VIEW (f), width, height); |