[X2Go-Commits] [nx-libs] 23/24: Set WM_CLASS to X2GoAgent/NXAgent (300_nxagent_set-wm-class.full.patch).

git-admin at x2go.org git-admin at x2go.org
Tue Feb 10 21:51:02 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 1e99734ec8862a68b8f46cf6714d269fff625ec3
Author: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
Date:   Tue Feb 10 21:45:19 2015 +0100

    Set WM_CLASS to X2GoAgent/NXAgent (300_nxagent_set-wm-class.full.patch).
    
      Depending on the binary name of the agent either NXAgent
      or X2GoAgent is set as WM_Class.
    
      This is needed for some window managers (like the one shipped with
      Maemo)
    
      The original WM_CLASS patch has been taken from the FreeNX patch
      series, author unknown.
    
      The nxagent/x2goagent has been done by the X2Go Project, author
      see below.
---
 debian/patches/300_nxagent_set-wm-class.full.patch |   60 --------------------
 debian/patches/series                              |    1 -
 nx-X11/programs/Xserver/hw/nxagent/Screen.c        |   36 ++++++++++++
 3 files changed, 36 insertions(+), 61 deletions(-)

diff --git a/debian/patches/300_nxagent_set-wm-class.full.patch b/debian/patches/300_nxagent_set-wm-class.full.patch
deleted file mode 100644
index 70b1c92..0000000
--- a/debian/patches/300_nxagent_set-wm-class.full.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Description: Set WM_CLASS to X2GoAgent/NXAgent
- Depending on the binary name of the agent either NXAgent
- or X2GoAgent is set as WM_Class.
- .
- This is needed for some window managers (like the one shipped with
- Maemo)
- .
- The original WM_CLASS patch has been taken from the FreeNX patch
- series, author unknown.
- .
- The nxagent/x2goagent has been done by the X2Go Project, author
- see below.
-Forwarded: not-needed
-Author: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-Last-Update: 2012-01-11
---- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
-@@ -1762,6 +1762,42 @@
-                   nxagentDefaultWindows[pScreen->myNum]);
-       #endif
- 
-+      /*
-+       * Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode
-+       * we need it to properly display all window parameters by some WMs
-+       * (for example on Maemo)
-+       */
-+      if(nxagentX2go)
-+      {
-+        #ifdef TEST
-+        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("X2GoAgent")+1);
-+        hint.res_class=malloc(strlen("X2GoAgent")+1);
-+        strcpy(hint.res_name,"X2GoAgent");
-+        strcpy(hint.res_class,"X2GoAgent");
-+        XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
-+        free(hint.res_name);
-+        free(hint.res_class);
-+      } else {
-+        #ifdef TEST
-+        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("NXAgent")+1);
-+        hint.res_class=malloc(strlen("NXAgent")+1);
-+        strcpy(hint.res_name,"NXAgent");
-+        strcpy(hint.res_class,"NXAgent");
-+        XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
-+        free(hint.res_name);
-+        free(hint.res_class);
-+      }
-+
-+
-       if (nxagentOption(Fullscreen))
-       {
-         nxagentFullscreenWindow = nxagentDefaultWindows[pScreen->myNum];
diff --git a/debian/patches/series b/debian/patches/series
index 30ed936..503a511 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-300_nxagent_set-wm-class.full.patch
 301_nx-X11_use-shared-libs.full.patch
 302_nx-X11_xkbbasedir-detection.full.patch
 320_nxagent_configurable-keystrokes.full.patch
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index f0ce4da..d0608a9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -1762,6 +1762,42 @@ N/A
                   nxagentDefaultWindows[pScreen->myNum]);
       #endif
 
+      /*
+       * Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode
+       * we need it to properly display all window parameters by some WMs
+       * (for example on Maemo)
+       */
+      if(nxagentX2go)
+      {
+        #ifdef TEST
+        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("X2GoAgent")+1);
+        hint.res_class=malloc(strlen("X2GoAgent")+1);
+        strcpy(hint.res_name,"X2GoAgent");
+        strcpy(hint.res_class,"X2GoAgent");
+        XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
+        free(hint.res_name);
+        free(hint.res_class);
+      } else {
+        #ifdef TEST
+        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("NXAgent")+1);
+        hint.res_class=malloc(strlen("NXAgent")+1);
+        strcpy(hint.res_name,"NXAgent");
+        strcpy(hint.res_class,"NXAgent");
+        XSetClassHint(nxagentDisplay,nxagentDefaultWindows[pScreen->myNum],&hint);
+        free(hint.res_name);
+        free(hint.res_class);
+      }
+
+
       if (nxagentOption(Fullscreen))
       {
         nxagentFullscreenWindow = nxagentDefaultWindows[pScreen->myNum];

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list