aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Display.c
diff options
context:
space:
mode:
authorOleksandr Shneyder <oleksandr.shneyder@obviously-nice.de>2015-02-10 19:21:35 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-10 19:40:52 +0100
commit6aa18cc28c4adee20b7a6494c8acb430380c4c98 (patch)
treebeb8eb20224a825c8be71970417bf33bf1f2ebca /nx-X11/programs/Xserver/hw/nxagent/Display.c
parent1681f1110ece0e5ad0accda009f106a2081c660c (diff)
downloadnx-libs-6aa18cc28c4adee20b7a6494c8acb430380c4c98.tar.gz
nx-libs-6aa18cc28c4adee20b7a6494c8acb430380c4c98.tar.bz2
nx-libs-6aa18cc28c4adee20b7a6494c8acb430380c4c98.zip
X2Go icon when run with x2goagent flavour (201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch).
Depending on the binary name of the agent either nxagent.xpm or x2go.xpm is used as window icon.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 9031c25c7..201d9dd74 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -77,6 +77,7 @@ is" without express or implied warranty.
#include "NXlib.h"
#include NXAGENT_ICON_NAME
+#include X2GOAGENT_ICON_NAME
/*
* Set here the required log level.
@@ -1941,12 +1942,29 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
Bool success = False;
XlibPixmap IconPixmap;
XlibPixmap IconShape;
+ char* agent_icon_name;
+ char* agentIconData;
- snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", NXAGENT_ICON_NAME);
+ /*
+ * selecting x2go icon when running as X2Go agent
+ */
+ if(nxagentX2go)
+ {
+ agent_icon_name=X2GOAGENT_ICON_NAME;
+ agentIconData=x2goagentIconData;
+ }
+ else
+ {
+ agent_icon_name=NXAGENT_ICON_NAME;
+ agentIconData=nxagentIconData;
+ }
+
+
+ snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", agent_icon_name);
if ((icon_fp = fopen(default_path, "r")) == NULL)
{
- icon_fp = nxagentLookForIconFile(NXAGENT_ICON_NAME, "r", icon_path);
+ icon_fp = nxagentLookForIconFile(agent_icon_name, "r", icon_path);
if (icon_fp != NULL)
{
@@ -1985,7 +2003,7 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
{
status = XpmCreatePixmapFromData(display,
DefaultRootWindow(display),
- nxagentIconData,
+ agentIconData,
&IconPixmap,
&IconShape,
NULL);