mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
Improve commentary in some parts of xterm.c
* src/xterm.c (x_probe_xfixes_extension): Rename to `x_fixes_pointer_blanking_supported', as fixes is now used for selection tracking as well. All callers changed. (x_focus_changed): Document where this code is used.
This commit is contained in:
parent
840b9eadd6
commit
a5d4c29a7f
24
src/xterm.c
24
src/xterm.c
@ -11414,15 +11414,18 @@ x_new_focus_frame (struct x_display_info *dpyinfo, struct frame *frame)
|
||||
x_frame_rehighlight (dpyinfo);
|
||||
}
|
||||
|
||||
#ifdef HAVE_XFIXES
|
||||
|
||||
/* True if the display in DPYINFO supports a version of Xfixes
|
||||
sufficient for pointer blanking. */
|
||||
#ifdef HAVE_XFIXES
|
||||
|
||||
static bool
|
||||
x_probe_xfixes_extension (struct x_display_info *dpyinfo)
|
||||
x_fixes_pointer_blanking_supported (struct x_display_info *dpyinfo)
|
||||
{
|
||||
return (dpyinfo->xfixes_supported_p
|
||||
&& dpyinfo->xfixes_major >= 4);
|
||||
}
|
||||
|
||||
#endif /* HAVE_XFIXES */
|
||||
|
||||
/* Toggle mouse pointer visibility on frame F using the XFixes
|
||||
@ -11493,7 +11496,7 @@ x_toggle_visible_pointer (struct frame *f, bool invisible)
|
||||
/* But if Xfixes is available, try using it instead. */
|
||||
if (dpyinfo->invisible_cursor == None)
|
||||
{
|
||||
if (x_probe_xfixes_extension (dpyinfo))
|
||||
if (x_fixes_pointer_blanking_supported (dpyinfo))
|
||||
{
|
||||
dpyinfo->fixes_pointer_blanking = true;
|
||||
xfixes_toggle_visible_pointer (f, invisible);
|
||||
@ -11521,7 +11524,7 @@ XTtoggle_invisible_pointer (struct frame *f, bool invisible)
|
||||
block_input ();
|
||||
#ifdef HAVE_XFIXES
|
||||
if (FRAME_DISPLAY_INFO (f)->fixes_pointer_blanking
|
||||
&& x_probe_xfixes_extension (FRAME_DISPLAY_INFO (f)))
|
||||
&& x_fixes_pointer_blanking_supported (FRAME_DISPLAY_INFO (f)))
|
||||
xfixes_toggle_visible_pointer (f, invisible);
|
||||
else
|
||||
#endif
|
||||
@ -11529,13 +11532,16 @@ XTtoggle_invisible_pointer (struct frame *f, bool invisible)
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
/* Handle FocusIn and FocusOut state changes for FRAME.
|
||||
If FRAME has focus and there exists more than one frame, puts
|
||||
a FOCUS_IN_EVENT into *BUFP. */
|
||||
/* Handle FocusIn and FocusOut state changes for FRAME. If FRAME has
|
||||
focus and there exists more than one frame, puts a FOCUS_IN_EVENT
|
||||
into *BUFP. Note that this code is not used to handle focus
|
||||
changes on builds that can use the X Input extension for handling
|
||||
input focus when it is available (currently the no toolkit and GTK
|
||||
3 toolkits). */
|
||||
|
||||
static void
|
||||
x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame,
|
||||
struct input_event *bufp)
|
||||
x_focus_changed (int type, int state, struct x_display_info *dpyinfo,
|
||||
struct frame *frame, struct input_event *bufp)
|
||||
{
|
||||
if (type == FocusIn)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user