Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!lll-tis!oodis01!uplherc!esunix!tlastran From: tlastran@esunix.UUCP (Tom LaStrange) Newsgroups: comp.windows.x Subject: Problems with XWMHints.window_group ????? Message-ID: <883@esunix.UUCP> Date: 21 Jun 88 20:53:14 GMT Organization: Evans & Sutherland, Salt Lake City, Utah Lines: 90 Has anyone tried using the window_group field of the XWMHints structure? I am trying to implement some window group operations in twm and it appears that by the time twm gets the XWMHints structure, the window_group member no longer contains meaningful data. I have included the little test program that I am using, it creates 3 windows and tries to give each a window_group value. If I am doing something wrong or if this is already a known problem could someone let me know? Also it appears that xterm and xclock have the WindowGroupHint bit set. Is this right? What group are they supposed to belong to? Thanks, Tom LaStrange Evans & Sutherland Computer Corporation UUCP Address: {ihnp4,seismo}!utah-cs!utah-gr!uplherc!esunix!tlastran Alternate: {ihnp4,decvax}!decwrl!esunix!tlastran ------------------- #include#include #include #include #include #include Display *dpy; /* which display are we talking to */ #define TRUE 1 main(argc, argv) int argc; char *argv[]; { Window w1, w2, w3; Window Root; XWMHints wmhints1, wmhints2, wmhints3; long Foreground, Background; XEvent event; if ((dpy = XOpenDisplay("")) == NULL) { fprintf(stderr, "testtwm: can't open the display\n"); exit(1); } Root = RootWindow(dpy, DefaultScreen(dpy)); Foreground = BlackPixel(dpy, DefaultScreen(dpy)); Background = WhitePixel(dpy, DefaultScreen(dpy)); w1 = XCreateSimpleWindow(dpy, Root, 100, 100, 100, 100, 2, Foreground, Background); w2 = XCreateSimpleWindow(dpy, Root, 250, 100, 100, 100, 2, Foreground, Background); w3 = XCreateSimpleWindow(dpy, Root, 400, 100, 100, 100, 2, Foreground, Background); wmhints1.flags = WindowGroupHint; wmhints1.window_group = w1; wmhints2.flags = WindowGroupHint; wmhints2.window_group = w1; wmhints3.flags = WindowGroupHint; wmhints3.window_group = w1; printf("w1 = 0x%x\n", w1); XSetWMHints(dpy, w1, &wmhints1); XSetWMHints(dpy, w2, &wmhints2); XSetWMHints(dpy, w3, &wmhints3); XSelectInput(dpy, w1, Expose); XSelectInput(dpy, w2, Expose); XSelectInput(dpy, w3, Expose); XMapWindow(dpy, w1); XMapWindow(dpy, w2); XMapWindow(dpy, w3); while (TRUE) { XNextEvent(dpy, &event); } }