]> git.eshelyaron.com Git - emacs.git/commitdiff
Make some frame params work on Haiku tooltip frames
authorPo Lu <luangruo@yahoo.com>
Thu, 21 Apr 2022 00:37:07 +0000 (00:37 +0000)
committerPo Lu <luangruo@yahoo.com>
Thu, 21 Apr 2022 00:37:07 +0000 (00:37 +0000)
* src/haiku_support.cc (RecomputeFeel): Handle tooltips.
(BWindow_set_tooltip_decoration): Use RecomputeFeel instead of
setting window feel by hand.

src/haiku_support.cc

index 3dc9eb88b737803582bb3d6773065bdeaf60bf4d..75c68f5541ce90c3a93c1eaed94847e8d073d1b6 100644 (file)
@@ -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