[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ff64a85b2d: Finish up last change with more speedups
From: |
Po Lu |
Subject: |
master ff64a85b2d: Finish up last change with more speedups |
Date: |
Thu, 1 Dec 2022 02:08:44 -0500 (EST) |
branch: master
commit ff64a85b2db11b57dda8be0fa0b749870d353590
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Finish up last change with more speedups
* src/xterm.c (x_atom_refs):
* src/xterm.h (struct x_display_info): Add some new atoms to be
interned at connection setup.
---
src/xterm.c | 14 ++++++++++++++
src/xterm.h | 6 ++++++
2 files changed, 20 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 18879669cd..43dc7c18b9 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1052,6 +1052,20 @@ static const struct x_atom_ref x_atom_refs[] =
/* Old OffiX (a.k.a. old KDE) drop protocol support. */
ATOM_REFS_INIT ("DndProtocol", Xatom_DndProtocol)
ATOM_REFS_INIT ("_DND_PROTOCOL", Xatom_DND_PROTOCOL)
+ /* Here are some atoms that are not actually used from C, just
+ defined to make replying to selection requests fast. */
+ ATOM_REFS_INIT ("text/plain;charset=utf-8", Xatom_text_plain_charset_utf_8)
+ ATOM_REFS_INIT ("LENGTH", Xatom_LENGTH)
+ ATOM_REFS_INIT ("FILE_NAME", Xatom_FILE_NAME)
+ ATOM_REFS_INIT ("CHARACTER_POSITION", Xatom_CHARACTER_POSITION)
+ ATOM_REFS_INIT ("LINE_NUMBER", Xatom_LINE_NUMBER)
+ ATOM_REFS_INIT ("COLUMN_NUMBER", Xatom_COLUMN_NUMBER)
+ ATOM_REFS_INIT ("OWNER_OS", Xatom_OWNER_OS)
+ ATOM_REFS_INIT ("HOST_NAME", Xatom_HOST_NAME)
+ ATOM_REFS_INIT ("USER", Xatom_USER)
+ ATOM_REFS_INIT ("CLASS", Xatom_CLASS)
+ ATOM_REFS_INIT ("NAME", Xatom_NAME)
+ ATOM_REFS_INIT ("SAVE_TARGETS", Xatom_SAVE_TARGETS)
};
enum
diff --git a/src/xterm.h b/src/xterm.h
index 6420457a88..86763dc6e0 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -537,6 +537,12 @@ struct x_display_info
KDE" protocol in x-dnd.el). */
Atom Xatom_DndProtocol, Xatom_DND_PROTOCOL;
+ /* Atoms to make x_intern_cached_atom fast. */
+ Atom Xatom_text_plain_charset_utf_8, Xatom_LENGTH, Xatom_FILE_NAME,
+ Xatom_CHARACTER_POSITION, Xatom_LINE_NUMBER, Xatom_COLUMN_NUMBER,
+ Xatom_OWNER_OS, Xatom_HOST_NAME, Xatom_USER, Xatom_CLASS,
+ Xatom_NAME, Xatom_SAVE_TARGETS;
+
/* The frame (if any) which has the X window that has keyboard focus.
Zero if none. This is examined by Ffocus_frame in xfns.c. Note
that a mere EnterNotify event can set this; if you need to know the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ff64a85b2d: Finish up last change with more speedups,
Po Lu <=