aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/999_nxagent_unbrand-agent.patch
blob: c9aea0496ce94615b3a2e7cbb1c5f2f62d1e5578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Description: Unbrand NX Agent Startup Screen
 By design this patch is probably not interesting to
 NX upstream.
Forwarded: not-needed
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Last-Update: 2012-12-31
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -1754,7 +1754,20 @@
       #ifdef TEST
       fprintf(stderr, "nxagentOpenScreen: Created new default window with id [%ld].\n",
                   nxagentDefaultWindows[pScreen->myNum]);
+      
+      fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n",
+                  nxagentDefaultWindows[pScreen->myNum]);      
       #endif
+      
+      XClassHint hint;
+      hint.res_name=malloc(strlen(HINT)+1);
+      hint.res_class=malloc(strlen(HINT)+1);
+      strcpy(hint.res_name,HINT);
+      strcpy(hint.res_class,HINT);
+      XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
+      free(hint.res_name);
+      free(hint.res_class);
+      
 
       if (nxagentOption(Fullscreen))
       {
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.h
@@ -36,6 +36,8 @@
 #define MIN_NXAGENT_HEIGHT 60
 #define NXAGENT_FRAME_WIDTH 2000
 
+#define HINT "NXAgent"
+
 #define nxagentSetPrintGeometry(screen) \
     nxagentPrintGeometryFlags = (1 << (screen));
     
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -204,6 +204,7 @@
 
   nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, nxagentLogoDepth);
 
+  return;
   if (!nxagentPixmapLogo)
   {
     return;
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1919,7 +1919,7 @@
   XlibPixmap IconPixmap;
   XlibPixmap IconShape;
 
-  snprintf(default_path, PATH_MAX-1, "/usr/NX/share/images/%s", NXAGENT_ICON_NAME);
+  snprintf(default_path, PATH_MAX-1, "/usr/share/pixmaps/%s", NXAGENT_ICON_NAME);
 
   if ((icon_fp = fopen(default_path, "r")) == NULL)
   {