#include <vlc_dialog.h>
#include <vlc_charset.h>
#include <vlc_plugin.h>
+#ifdef HAVE_SEARCH_H
+# include <search.h>
+#endif
#include <poll.h>
-#include <search.h>
static int Open (vlc_object_t *);
static void Close (vlc_object_t *);
{
vlc_probe_t *probe = (vlc_probe_t *)obj;
- char *display = var_CreateGetNonEmptyString (obj, "x11-display");
+ char *display = var_InheritString (obj, "x11-display");
xcb_connection_t *conn = xcb_connect (display, NULL);
free (display);
if (xcb_connection_has_error (conn))
return VLC_PROBE_CONTINUE;
xcb_disconnect (conn);
return vlc_sd_probe_Add (probe, "xcb_apps{longname=\"Screen capture\"}",
- N_("Screen capture"), SD_CAT_MYCOMPUTER);
+ N_("Screen capture"), SD_CAT_DEVICES);
}
/**
sd->p_sys = p_sys;
/* Connect to X server */
- char *display = var_CreateGetNonEmptyString (obj, "x11-display");
+ char *display = var_InheritString (obj, "x11-display");
int snum;
xcb_connection_t *conn = xcb_connect (display, &snum);
free (display);
r = xcb_intern_atom_reply (conn, ncl, NULL);
if (r == NULL || r->atom == 0)
{
- dialog_Fatal (sd, _("Application list failure"),
- _("Your window manager does not support application list."));
- msg_Err (sd, "application list not support (_NET_CLIENT_LIST absent)");
- free (r);
- goto error;
+ dialog_Fatal (sd, _("Screen capture"),
+ _("Your window manager does not provide a list of applications."));
+ msg_Err (sd, "client list not supported (_NET_CLIENT_LIST absent)");
}
- p_sys->net_client_list = r->atom;
+ p_sys->net_client_list = r ? r->atom : 0;
free (r);
r = xcb_intern_atom_reply (conn, nwn, NULL);
if (r != NULL)