[vlc-devel] commit: xcb SD: add a persistent item for the whole desktop ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Feb 13 20:15:44 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 13 21:14:44 2010 +0200| [88f28b24c32387bfc9ed12c64401aa6f328b01c3] | committer: Rémi Denis-Courmont
xcb SD: add a persistent item for the whole desktop
(TODO: add one item per X RandR view port)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88f28b24c32387bfc9ed12c64401aa6f328b01c3
---
modules/services_discovery/xcb_apps.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/modules/services_discovery/xcb_apps.c b/modules/services_discovery/xcb_apps.c
index 488b314..01c9e68 100644
--- a/modules/services_discovery/xcb_apps.c
+++ b/modules/services_discovery/xcb_apps.c
@@ -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);
+}
More information about the vlc-devel
mailing list