summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-06-12 20:55:11 +0000
committerphintuka <phintuka>2007-06-12 20:55:11 +0000
commite383e1752117aadd8e98953babc0d50968f1914d (patch)
tree65b5c7bbc85399c53b8429c982ca4b81bb118ac2
parent82a9d827975d33525f3b04c94d6ad5610f26918e (diff)
downloadxineliboutput-e383e1752117aadd8e98953babc0d50968f1914d.tar.gz
xineliboutput-e383e1752117aadd8e98953babc0d50968f1914d.tar.bz2
Show current VDR server in X title bar
-rw-r--r--xine_frontend.c13
-rw-r--r--xine_sxfe_frontend.c23
2 files changed, 30 insertions, 6 deletions
diff --git a/xine_frontend.c b/xine_frontend.c
index d55de99c..75fd9941 100644
--- a/xine_frontend.c
+++ b/xine_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend.c,v 1.38 2007-05-18 15:49:02 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.39 2007-06-12 20:55:11 phintuka Exp $
*
*/
@@ -689,6 +689,17 @@ static int fe_xine_open(frontend_t *this_gen, const char *mrl)
#endif
x_upd_num("engine.buffers.video_num_buffers", this->pes_buffers);
+#if !defined(IS_FBFE) && defined(FE_STANDALONE)
+ if(!strncmp(mrl, "xvdr:", 5) && strstr(mrl, "//")) {
+ char *name = NULL, *end;
+ asprintf(&name, "VDR - %s", strstr(mrl, "//")+2);
+ if(NULL != (end = strstr(name, ":37890"))) *end = 0; /* hide only default port */
+ XStoreName(this->display, this->window[0], name);
+ XStoreName(this->display, this->window[1], name);
+ free(name);
+ }
+#endif
+
return result;
}
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index e87112ef..b9722ae6 100644
--- a/xine_sxfe_frontend.c
+++ b/xine_sxfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_sxfe_frontend.c,v 1.25 2007-05-18 15:49:02 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.26 2007-06-12 20:55:11 phintuka Exp $
*
*/
@@ -251,13 +251,26 @@ static void set_above(sxfe_t *this, int stay_above)
if(this->window_id > 0)
return;
- this->stay_above = stay_above;
-
+ if(this->stay_above != stay_above) {
#ifdef FE_STANDALONE
- XStoreName(this->display, this->window[0], stay_above ? "VDR (top)" : "VDR");
+ char *name, *newname = NULL;
+ if(XFetchName(this->display, this->window[0], &name) && name) {
+ if(strstr(name, " (top)"))
+ *strstr(name, " (top)") = 0;
+ if(stay_above)
+ asprintf(&newname, "%s (top)", name);
+ XStoreName(this->display, this->window[0], newname ?: name);
+ XStoreName(this->display, this->window[1], newname ?: name);
+ XFree(name);
+ free(newname);
+ } else {
+ XStoreName(this->display, this->window[0], stay_above ? "VDR - (top)" : "VDR");
+ }
#else
- XStoreName(this->display, this->window[0], stay_above ? "Local VDR (top)" : "Local VDR");
+ XStoreName(this->display, this->window[0], stay_above ? "Local VDR (top)" : "Local VDR");
#endif
+ this->stay_above = stay_above;
+ }
memset(&ev, 0, sizeof(ev));
ev.type = ClientMessage;