From ab530ddeb57084993fbf5f5857f3f8f3b4ec606c Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 21 Apr 2022 00:37:07 +0000 Subject: [PATCH] Make some frame params work on Haiku tooltip frames * src/haiku_support.cc (RecomputeFeel): Handle tooltips. (BWindow_set_tooltip_decoration): Use RecomputeFeel instead of setting window feel by hand. --- src/haiku_support.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 3dc9eb88b73..75c68f5541c 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -500,6 +500,7 @@ public: int window_id; bool *menus_begun = NULL; enum haiku_z_group z_group; + bool tooltip_p = false; EmacsWindow () : BWindow (BRect (0, 0, 0, 0), "", B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_NO_SERVER_SIDE_WINDOW_MODIFIERS) @@ -535,7 +536,7 @@ public: void RecomputeFeel (void) { - if (override_redirect_p) + if (override_redirect_p || tooltip_p) SetFeel (kMenuWindowFeel); else if (parent) SetFeel (B_FLOATING_SUBSET_WINDOW_FEEL); @@ -3037,11 +3038,12 @@ BWindow_change_decoration (void *window, int decorate_p) void BWindow_set_tooltip_decoration (void *window) { - BWindow *w = (BWindow *) window; + EmacsWindow *w = (EmacsWindow *) window; if (!w->LockLooper ()) gui_abort ("Failed to lock window while setting ttip decoration"); + w->tooltip_p = true; + w->RecomputeFeel (); w->SetLook (B_BORDERED_WINDOW_LOOK); - w->SetFeel (kMenuWindowFeel); w->SetFlags (B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AVOID_FRONT -- 2.39.2