"_NET_WM_ICON_NAME",
"_NET_WM_PING",
"_NET_WM_ICON",
+ "_NET_WM_USER_TIME",
#endif
#if USE_XIM
"WM_LOCALE_NAME",
#ifdef LOCAL_X_IS_UNIX
if (id[0] == ':')
{
- val = rxvt_malloc (5 + strlen (id) + 1);
+ if (!(val = rxvt_temp_buf<char> (5 + strlen (id) + 1)))
+ return false;
strcpy (val, "unix/");
strcat (val, id);
dpy = XOpenDisplay (val);
- free (val);
}
else
#endif
int fd = XConnectionNumber (dpy);
- // try to detect wether we have a local connection.
+ // try to detect whether we have a local connection.
// assume unix domain socket == local, everything else not
// TODO: might want to check for inet/127.0.0.1
is_local = 0;
void
rxvt_display::ref_next ()
{
- // TODO: somehow check wether the database files/resources changed
+ // TODO: somehow check whether the database files/resources changed
// before affording re-loading/parsing
XrmDestroyDatabase (XrmGetDatabase (dpy));
XrmSetDatabase (dpy, get_resources (true));
if (cur_owner && cur_owner != owner)
{
- cur_owner->selection_clear (clipboard);
- cur_owner->flush ();
+ rxvt_term *term = cur_owner;
+ term->selection_clear (clipboard);
+ term->flush ();
}
cur_owner = owner;
l = strlen (locale);
m = strlen (modifiers);
- if (!(id = (char *)malloc (l + m + 2)))
+ if (!(id = rxvt_temp_buf<char> (l + m + 2)))
return 0;
memcpy (id, locale, l); id[l] = '\n';
rxvt_xim *xim = xims.get (id);
- free (id);
-
return xim;
}