{
if (haiku_get_color (SSDATA (Vx_cursor_fore_pixel),
&fore_pixel))
- error ("Bad color %s", Vx_cursor_fore_pixel);
+ error ("Bad color %s", SSDATA (Vx_cursor_fore_pixel));
FRAME_OUTPUT_DATA (f)->cursor_fg = fore_pixel.pixel;
}
else
(Lisp_Object string, Lisp_Object frame, Lisp_Object parms,
Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
{
- struct frame *tip_f;
+ struct frame *f, *tip_f;
struct window *w;
int root_x, root_y;
struct buffer *old_buffer;
if (NILP (frame))
frame = selected_frame;
- decode_window_system_frame (frame);
+ f = decode_window_system_frame (frame);
if (NILP (timeout))
timeout = make_fixnum (5);
void *wnd = FRAME_HAIKU_WINDOW (tip_f);
BWindow_resize (wnd, width, height);
BView_resize_to (FRAME_HAIKU_VIEW (tip_f), width, height);
+ BView_set_view_cursor (FRAME_HAIKU_VIEW (tip_f),
+ FRAME_OUTPUT_DATA (f)->current_cursor);
BWindow_set_offset (wnd, root_x, root_y);
BWindow_set_visible (wnd, true);
SET_FRAME_VISIBLE (tip_f, true);
FRAME_PIXEL_WIDTH (tip_f) = width;
FRAME_PIXEL_HEIGHT (tip_f) = height;
BWindow_sync (wnd);
+
+ /* This is needed because the app server resets the cursor whenever
+ a new window is mapped, so we won't see the cursor set on the
+ tooltip if the mouse pointer isn't actually over it. */
+ BView_set_view_cursor (FRAME_HAIKU_VIEW (f),
+ FRAME_OUTPUT_DATA (f)->current_cursor);
unblock_input ();
w->must_be_updated_p = true;