XWMHints wm_hints; XClassHint class_hints; /* format of the window name and icon name * arguments has changed in R4 */ XTextProperty windowName, iconName; /* These calls store window_name and icon_name into * XTextProperty structures and set their other * fields properly. */ if (XStringListToTextProperty(&window_name, 1, &windowName) == 0) { (void) fprintf( stderr, "%s: structure allocation for windowName failed.\n", progname); exit(-1); } if (XStringListToTextProperty(&icon_name, 1, &iconName) == 0) { (void) fprintf( stderr, "%s: structure allocation for iconName failed.\n", progname); exit(-1); } wm_hints.initial_state = NormalState; wm_hints.input = True; wm_hints.icon_pixmap = icon_pixmap; wm_hints.flags = StateHint | IconPixmapHint | InputHint; class_hints.res_name = progname; class_hints.res_class = "Basicwin"; XSetWMProperties(display, win, &windowName, &iconName, argv, argc, &size_hints, &wm_hints, &class_hints);