diff options
author | Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> | 2015-02-10 21:45:19 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-10 21:45:19 +0100 |
commit | 1e99734ec8862a68b8f46cf6714d269fff625ec3 (patch) | |
tree | 81a7cc938c4c80f3b7df2540e842ef0fca445e32 /nx-X11/programs/Xserver/hw/nxagent | |
parent | 1be1c4a21bb54e60ec60456374d9ef55aaf55e2f (diff) | |
download | nx-libs-1e99734ec8862a68b8f46cf6714d269fff625ec3.tar.gz nx-libs-1e99734ec8862a68b8f46cf6714d269fff625ec3.tar.bz2 nx-libs-1e99734ec8862a68b8f46cf6714d269fff625ec3.zip |
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.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index f0ce4dacf..d0608a900 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]; |