- experimental OnTheSpot editing support (-pe xim-onthespot).
- moved Shift-Button2 paste combination to Meta-Button2.
- removed (unused) arabic presentation form composing sequences.
+ - reduced number of server turnarounds at startup by allocating
+ atoms only once per display.
- changed version sos (ESC [ > c) response to be more compatible with
xterm.
(32 + y + 1));
}
-#ifdef USING_W11LIB
-void
-rxvt_W11_process_x_event (XEvent *ev)
-{
- rxvt_t *r = rxvt_get_r ();
-
- x_cb (*ev);
-}
-#endif
-
/*{{{ process an X event */
void
rxvt_term::x_cb (XEvent &ev)
bool
rxvt_term::init_vars ()
{
- pix_colors_focused = new rxvt_color [TOTAL_COLORS];
+ pix_colors = //
+ pix_colors_focused = new rxvt_color [TOTAL_COLORS];
#ifdef OFF_FOCUS_FADING
pix_colors_unfocused = new rxvt_color [TOTAL_COLORS];
#endif
- pix_colors = pix_colors_focused;
-
- if (pix_colors == NULL)
- return false;
#if defined(XPM_BACKGROUND) || defined(TRANSPARENT)
pixmap = None;
#ifdef XPM_BACKGROUND
if (rs[Rs_backgroundPixmap] != NULL
- && ! OPTION (Opt_transparent))
+ && !OPTION (Opt_transparent))
{
const char *p = rs[Rs_backgroundPixmap];
HOOK_INVOKE ((this, HOOK_START, DT_END));
+#if ENABLE_XEMBED
+ if (rs[Rs_embed])
+ {
+ long info[2] = { 0, XEMBED_MAPPED };
+
+ XChangeProperty (display->display, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO],
+ 32, PropModeReplace, (unsigned char *)&info, 2);
+ }
+#endif
+
XMapWindow (disp, vt);
XMapWindow (disp, parent[0]);
NUM_RESOURCES
};
-// see init.C:xa_names, which must be kept in sync
-enum {
- XA_TEXT = 0,
- XA_COMPOUND_TEXT,
- XA_UTF8_STRING,
- XA_MULTIPLE,
- XA_TARGETS,
- XA_TIMESTAMP,
- XA_VT_SELECTION,
- XA_INCR,
- XA_WM_PROTOCOLS,
- XA_WM_DELETE_WINDOW,
- XA_CLIPBOARD,
-#if ENABLE_FRILLS
- XA_MOTIF_WM_HINTS,
-#endif
-#if ENABLE_EWMH
- XA_NET_WM_PID,
- XA_NET_WM_NAME,
- XA_NET_WM_ICON_NAME,
- XA_NET_WM_PING,
-#endif
-#if USE_XIM
- XA_WM_LOCALE_NAME,
-#endif
-#if TRANSPARENT
- XA_XROOTPMAP_ID,
- XA_ESETROOT_PMAP_ID,
-#endif
-#if ENABLE_XEMBED
- XA_XEMBED,
- XA_XEMBED_INFO,
-#endif
- NUM_XA
-};
-
/* DEC private modes */
#define PrivMode_132 (1UL<<0)
#define PrivMode_132OK (1UL<<1)
unsigned long priv_modes,
SavedModes;
/* ---------- */
- Atom xa[NUM_XA];
+ Atom *xa;
/* ---------- */
#ifdef RXVT_SCROLLBAR
GC scrollbarGC,
# include <sys/un.h>
#endif
+const char *const xa_names[] =
+ {
+ "TEXT",
+ "COMPOUND_TEXT",
+ "UTF8_STRING",
+ "MULTIPLE",
+ "TARGETS",
+ "TIMESTAMP",
+ "VT_SELECTION",
+ "INCR",
+ "WM_PROTOCOLS",
+ "WM_DELETE_WINDOW",
+ "CLIPBOARD",
+#if ENABLE_FRILLS
+ "_MOTIF_WM_HINTS",
+#endif
+#if ENABLE_EWMH
+ "_NET_WM_PID",
+ "_NET_WM_NAME",
+ "_NET_WM_ICON_NAME",
+ "_NET_WM_PING",
+#endif
+#if USE_XIM
+ "WM_LOCALE_NAME",
+ "XIM_SERVERS",
+#endif
+#ifdef TRANSPARENT
+ "_XROOTPMAP_ID",
+ "ESETROOT_PMAP_ID",
+#endif
+#if ENABLE_XEMBED
+ "_XEMBED",
+ "_XEMBED_INFO",
+#endif
+ };
+
+/////////////////////////////////////////////////////////////////////////////
+
refcounted::refcounted (const char *id)
{
this->id = strdup (id);
cmap = DefaultColormap (display, screen);
depth = DefaultDepth (display, screen);
+ assert (sizeof (xa_names) / sizeof (char *) == NUM_XA);
+ XInternAtoms (display, (char **)xa_names, NUM_XA, False, xa);
+
XrmSetDatabase (display, get_resources ());
#ifdef POINTER_BLANK
fcntl (fd, F_SETFD, FD_CLOEXEC);
XSelectInput (display, root, PropertyChangeMask);
-#ifdef USE_XIM
- xa_xim_servers = XInternAtom (display, "XIM_SERVERS", 0);
-#endif
flush ();
int actual_format;
unsigned long nitems, bytes_after;
- if (XGetWindowProperty (display, root, xa_xim_servers, 0L, 1000000L,
+ if (XGetWindowProperty (display, root, xa[XA_XIM_SERVERS], 0L, 1000000L,
False, XA_ATOM, &actual_type, &actual_format,
&nitems, &bytes_after, (unsigned char **)&atoms)
!= Success )
{
if (xev.type == PropertyNotify
&& xev.xany.window == root
- && xev.xproperty.atom == xa_xim_servers)
+ && xev.xproperty.atom == xa[XA_XIM_SERVERS])
im_change_check ();
#endif
for (int i = xw.size (); i--; )
#include "callback.h"
+// see rxvttoolkit.C:xa_names, which must be kept in sync
+enum {
+ XA_TEXT,
+ XA_COMPOUND_TEXT,
+ XA_UTF8_STRING,
+ XA_MULTIPLE,
+ XA_TARGETS,
+ XA_TIMESTAMP,
+ XA_VT_SELECTION,
+ XA_INCR,
+ XA_WM_PROTOCOLS,
+ XA_WM_DELETE_WINDOW,
+ XA_CLIPBOARD,
+#if ENABLE_FRILLS
+ XA_MOTIF_WM_HINTS,
+#endif
+#if ENABLE_EWMH
+ XA_NET_WM_PID,
+ XA_NET_WM_NAME,
+ XA_NET_WM_ICON_NAME,
+ XA_NET_WM_PING,
+#endif
+#if USE_XIM
+ XA_WM_LOCALE_NAME,
+ XA_XIM_SERVERS,
+#endif
+#if TRANSPARENT
+ XA_XROOTPMAP_ID,
+ XA_ESETROOT_PMAP_ID,
+#endif
+#if ENABLE_XEMBED
+ XA_XEMBED,
+ XA_XEMBED_INFO,
+#endif
+ NUM_XA
+};
+
struct rxvt_term;
struct rxvt_display;
#endif
struct rxvt_display : refcounted {
- Atom xa_xim_servers;
-
io_manager_vec<xevent_watcher> xw;
io_watcher x_ev; void x_cb (io_watcher &w, short revents);
Colormap cmap;
Window root;
rxvt_term *selection_owner;
+ Atom xa[NUM_XA];
#ifndef NO_SLOW_LINK_SUPPORT
bool is_local;
#endif