diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-03-28 08:58:35 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-03-28 08:58:35 +0100 |
commit | db7feaf9883bb0dc419593588036405ef12ebca1 (patch) | |
tree | 1a911fe1a08aed78845e17b5350c9238452a12dd /nx-X11/programs/Xserver/hw/nxagent/Display.c | |
parent | e77bf36d9afbc7e56522574b06217d57c11dd095 (diff) | |
download | nx-libs-db7feaf9883bb0dc419593588036405ef12ebca1.tar.gz nx-libs-db7feaf9883bb0dc419593588036405ef12ebca1.tar.bz2 nx-libs-db7feaf9883bb0dc419593588036405ef12ebca1.zip |
Revert "release 3.5.0.19"
This reverts commit e77bf36d9afbc7e56522574b06217d57c11dd095.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Display.c | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index b01d66cb0..9031c25c7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -77,7 +77,6 @@ is" without express or implied warranty. #include "NXlib.h" #include NXAGENT_ICON_NAME -#include X2GOAGENT_ICON_NAME /* * Set here the required log level. @@ -1430,10 +1429,22 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. g = pV.green_mask; b = pV.blue_mask; - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - nxagentLogoGray = 0x222222; + if (!pV.red_mask || !pV.green_mask || !pV.blue_mask) + { + nxagentLogoBlack = 0x000000; + nxagentLogoRed = 0xff0000; + nxagentLogoWhite = 0xffffff; + } + else + { + for (or=0, off=0x800000; (r&(off>>or)) == 0; or++); + for (og=0, off=0x800000; (g&(off>>og)) == 0; og++); + for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++); + + nxagentLogoRed = nxagentLogoColor(0xff0000); + nxagentLogoBlack = nxagentLogoColor(0x000000); + nxagentLogoWhite = 0xffffff; + } #ifdef WATCH @@ -1930,29 +1941,12 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask) Bool success = False; XlibPixmap IconPixmap; XlibPixmap IconShape; - char* agent_icon_name; - char* agentIconData; - - /* - * 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); + snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", NXAGENT_ICON_NAME); if ((icon_fp = fopen(default_path, "r")) == NULL) { - icon_fp = nxagentLookForIconFile(agent_icon_name, "r", icon_path); + icon_fp = nxagentLookForIconFile(NXAGENT_ICON_NAME, "r", icon_path); if (icon_fp != NULL) { @@ -1991,7 +1985,7 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask) { status = XpmCreatePixmapFromData(display, DefaultRootWindow(display), - agentIconData, + nxagentIconData, &IconPixmap, &IconShape, NULL); @@ -2684,10 +2678,22 @@ Bool nxagentReconnectDisplay(void *p0) g = pV.green_mask; b = pV.blue_mask; - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - nxagentLogoGray = 0x222222; + if (!pV.red_mask || !pV.green_mask || !pV.blue_mask) + { + nxagentLogoBlack = 0x000000; + nxagentLogoRed = 0xff0000; + nxagentLogoWhite = 0xffffff; + } + else + { + for (or=0, off=0x800000; (r&(off>>or)) == 0; or++); + for (og=0, off=0x800000; (g&(off>>og)) == 0; og++); + for (ob=0, off=0x800000; (b&(off>>ob)) == 0; ob++); + + nxagentLogoRed = nxagentLogoColor(0xff0000); + nxagentLogoBlack = nxagentLogoColor(0x000000); + nxagentLogoWhite = 0xffffff; + } useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); |