From: Po Lu Date: Tue, 7 Jun 2022 12:13:10 +0000 (+0000) Subject: Fix coding style of some Haiku files X-Git-Tag: emacs-29.0.90~1910^2~175 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6a4444aa390f20c195f864a7c1b8114d82ffdeb5;p=emacs.git Fix coding style of some Haiku files * src/haiku_support.cc: (FrameResized): (class EmacsView, AfterResize): Fix coding and initializer style. * src/haiku_support.h (struct haiku_resize_event): Rename confusingly named fields. * src/haikuterm.c (haiku_read_socket): Update accordingly. --- diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 3b1a2cfcb38..3c8e5dc8c2e 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -1103,8 +1103,8 @@ public: { struct haiku_resize_event rq; rq.window = this; - rq.px_heightf = newHeight + 1.0f; - rq.px_widthf = newWidth + 1.0f; + rq.width = newWidth + 1.0f; + rq.height = newHeight + 1.0f; haiku_write (FRAME_RESIZED, &rq); BWindow::FrameResized (newWidth, newHeight); @@ -1492,25 +1492,36 @@ public: class EmacsView : public BView { public: - uint32_t previous_buttons = 0; - int looper_locked_count = 0; + uint32_t previous_buttons; + int looper_locked_count; BRegion sb_region; BRegion invalid_region; - BView *offscreen_draw_view = NULL; - BBitmap *offscreen_draw_bitmap_1 = NULL; - BBitmap *copy_bitmap = NULL; + BView *offscreen_draw_view; + BBitmap *offscreen_draw_bitmap_1; + BBitmap *copy_bitmap; #ifdef USE_BE_CAIRO - cairo_surface_t *cr_surface = NULL; - cairo_t *cr_context = NULL; + cairo_surface_t *cr_surface; + cairo_t *cr_context; BLocker cr_surface_lock; #endif BPoint tt_absl_pos; - BMessage *wait_for_release_message = NULL; - - EmacsView () : BView (BRect (0, 0, 0, 0), "Emacs", B_FOLLOW_NONE, B_WILL_DRAW) + BMessage *wait_for_release_message; + + EmacsView () : BView (BRect (0, 0, 0, 0), "Emacs", + B_FOLLOW_NONE, B_WILL_DRAW), + previous_buttons (0), + looper_locked_count (0), + offscreen_draw_view (NULL), + offscreen_draw_bitmap_1 (NULL), + copy_bitmap (NULL), +#ifdef USE_BE_CAIRO + cr_surface (NULL), + cr_context (NULL), +#endif + wait_for_release_message (NULL) { } @@ -1658,9 +1669,7 @@ public: #endif if (looper_locked_count) - { - offscreen_draw_bitmap_1->Lock (); - } + offscreen_draw_bitmap_1->Lock (); UnlockLooper (); } diff --git a/src/haiku_support.h b/src/haiku_support.h index 9597c24c5db..a2ad222f85a 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h @@ -129,8 +129,8 @@ struct haiku_quit_requested_event struct haiku_resize_event { void *window; - float px_heightf; - float px_widthf; + float width; + float height; }; struct haiku_expose_event diff --git a/src/haikuterm.c b/src/haikuterm.c index 0a994b7e605..55e8640ec21 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -3143,8 +3143,8 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) if (!f) continue; - int width = lrint (b->px_widthf); - int height = lrint (b->px_heightf); + int width = lrint (b->width); + int height = lrint (b->height); if (FRAME_OUTPUT_DATA (f)->wait_for_event_type == FRAME_RESIZED)