From 0167591986a482dc516d0ae62cda87aa421d4dc9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 5 May 2018 20:13:20 +0200 Subject: Screen.c: simplify setting of window name/class --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'nx-X11/programs/Xserver/hw') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index c29df9275..db8e713b2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1812,20 +1812,6 @@ N/A * 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 with id [%ld].\n", - (long int)nxagentDefaultWindows[pScreen->myNum]); - #endif - XClassHint hint; - hint.res_name = strdup("X2GoAgent"); - hint.res_class = strdup("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 with id [%ld].\n", @@ -1833,8 +1819,17 @@ N/A #endif XClassHint hint; - hint.res_name = strdup("NXAgent"); - hint.res_class = strdup("NXAgent"); + + if(nxagentX2go) + { + hint.res_name = strdup("X2GoAgent"); + hint.res_class = strdup("X2GoAgent"); + } + else + { + hint.res_name = strdup("NXAgent"); + hint.res_class = strdup("NXAgent"); + } XSetClassHint(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], &hint); free(hint.res_name); free(hint.res_class); -- cgit v1.2.3