emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ec2d990 4/5: Fix cursor setting for tip frame; re-e


From: Ken Raeburn
Subject: [Emacs-diffs] master ec2d990 4/5: Fix cursor setting for tip frame; re-enable cursor generation.
Date: Sun, 11 Oct 2015 05:24:54 +0000

branch: master
commit ec2d99026ff2f928b0669da2c2cf909b62aeb6c1
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>

    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.
---
 src/xfns.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/xfns.c b/src/xfns.c
index 468a856..fefd8e8 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]