From: Po Lu Date: Thu, 21 Apr 2022 00:37:07 +0000 (+0000) Subject: Make some frame params work on Haiku tooltip frames X-Git-Tag: emacs-29.0.90~1931^2~383 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ab530ddeb57084993fbf5f5857f3f8f3b4ec606c;p=emacs.git 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. --- 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