Commit 88f28b24 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

xcb SD: add a persistent item for the whole desktop

(TODO: add one item per X RandR view port)
parent 4a95265a
......@@ -68,6 +68,7 @@ struct services_discovery_sys_t
static void *Run (void *);
static void Update (services_discovery_t *);
static void DelItem (void *);
static void AddDesktopItem(services_discovery_t *);
static int vlc_sd_probe_Open (vlc_object_t *obj)
{
......@@ -126,6 +127,9 @@ static int Open (vlc_object_t *obj)
goto error;
}
/* Add a permanent item for the entire desktop */
AddDesktopItem (sd);
p_sys->root_window = scr->root;
xcb_change_window_attributes (conn, scr->root, XCB_CW_EVENT_MASK,
&(uint32_t) { XCB_EVENT_MASK_PROPERTY_CHANGE });
......@@ -338,3 +342,15 @@ static void Update (services_discovery_t *sd)
tdestroy (oldnodes, DelItem);
p_sys->nodes = newnodes;
}
static void AddDesktopItem(services_discovery_t *sd)
{
input_item_t *item;
item = input_item_NewWithType (VLC_OBJECT (sd), "screen://", _("Desktop"),
0, NULL, 0, -1, ITEM_TYPE_CARD);
if (item == NULL)
return;
services_discovery_AddItem (sd, item, NULL);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment