[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a5d4c29a7f: Improve commentary in some parts of xterm.c
From: |
Po Lu |
Subject: |
master a5d4c29a7f: Improve commentary in some parts of xterm.c |
Date: |
Wed, 2 Nov 2022 06:27:59 -0400 (EDT) |
branch: master
commit a5d4c29a7fac505254576515704f7943afad18b3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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.
---
src/xterm.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index bd60a04c6c..17ff35a671 100644
--- a/src/xterm.c
+++ b/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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a5d4c29a7f: Improve commentary in some parts of xterm.c,
Po Lu <=