From: Ken Raeburn Date: Thu, 8 Oct 2015 08:13:06 +0000 (-0400) Subject: Fix cursor setting for tip frame; re-enable cursor generation. X-Git-Tag: emacs-25.0.90~1163 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec2d99026ff2f928b0669da2c2cf909b62aeb6c1;p=emacs.git Fix cursor setting for tip frame; re-enable cursor generation. * src/xfns.c (x_create_tip_frame): Include the cursor in the window attributes sent when creating the new X window. Don't skip setting the pointerColor parameter. --- diff --git a/src/xfns.c b/src/xfns.c index 468a85645d0..fefd8e8f91f 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5319,12 +5319,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo, "foreground", "Foreground", RES_TYPE_STRING); x_default_parameter (f, parms, Qbackground_color, build_string ("white"), "background", "Background", RES_TYPE_STRING); -#if 0 /* This code currently doesn't work for tooltip frames; the - cursor being set doesn't seem to get used. The call generates - a bit of traffic, so skip it for now. */ x_default_parameter (f, parms, Qmouse_color, build_string ("black"), "pointerColor", "Foreground", RES_TYPE_STRING); -#endif x_default_parameter (f, parms, Qcursor_color, build_string ("black"), "cursorColor", "Foreground", RES_TYPE_STRING); x_default_parameter (f, parms, Qborder_color, build_string ("black"), @@ -5345,7 +5341,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Atom type = FRAME_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip; block_input (); - mask = CWBackPixel | CWOverrideRedirect | CWEventMask; + mask = CWBackPixel | CWOverrideRedirect | CWEventMask | CWCursor; if (DoesSaveUnders (dpyinfo->screen)) mask |= CWSaveUnder; @@ -5355,6 +5351,9 @@ x_create_tip_frame (struct x_display_info *dpyinfo, attrs.override_redirect = True; attrs.save_under = True; attrs.background_pixel = FRAME_BACKGROUND_PIXEL (f); + attrs.cursor = + f->output_data.x->current_cursor + = f->output_data.x->text_cursor; /* Arrange for getting MapNotify and UnmapNotify events. */ attrs.event_mask = StructureNotifyMask; tip_window