From afcec5f0a50665660d4a7bf8526b201101fa33e2 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 26 Jun 2022 15:36:43 +0800 Subject: [PATCH] Add some more common predefined atoms * src/xterm.c (x_intern_cached_atom, x_get_atom_name): Add DRAWABLE, BITMAP, COLORMAP, CURSOR and FONT. --- src/xterm.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 8aeaca230fa..6afb2a3312f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -25631,11 +25631,26 @@ x_intern_cached_atom (struct x_display_info *dpyinfo, if (!strcmp (name, "ATOM")) return XA_ATOM; + if (!strcmp (name, "WINDOW")) + return XA_WINDOW; + + if (!strcmp (name, "DRAWABLE")) + return XA_DRAWABLE; + + if (!strcmp (name, "BITMAP")) + return XA_BITMAP; + if (!strcmp (name, "CARDINAL")) return XA_CARDINAL; - if (!strcmp (name, "WINDOW")) - return XA_WINDOW; + if (!strcmp (name, "COLORMAP")) + return XA_COLORMAP; + + if (!strcmp (name, "CURSOR")) + return XA_CURSOR; + + if (!strcmp (name, "FONT")) + return XA_FONT; if (dpyinfo->motif_drag_atom != None && !strcmp (name, dpyinfo->motif_drag_atom_name)) @@ -25698,6 +25713,18 @@ x_get_atom_name (struct x_display_info *dpyinfo, Atom atom, case XA_WINDOW: return xstrdup ("WINDOW"); + case XA_DRAWABLE: + return xstrdup ("DRAWABLE"); + + case XA_BITMAP: + return xstrdup ("BITMAP"); + + case XA_COLORMAP: + return xstrdup ("COLORMAP"); + + case XA_FONT: + return xstrdup ("FONT"); + default: if (dpyinfo->motif_drag_atom && atom == dpyinfo->motif_drag_atom) -- 2.39.2