Index: tset/Xlib3/clsdsply/clsdsply.m =================================================================== RCS file: /cvs/xtest/xts5/tset/Xlib3/clsdsply/clsdsply.m,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 clsdsply.m --- tset/Xlib3/clsdsply/clsdsply.m 15 Apr 2005 14:05:24 -0000 1.1.1.2 +++ tset/Xlib3/clsdsply/clsdsply.m 8 Sep 2005 02:23:23 -0000 @@ -385,21 +385,24 @@ >>STRATEGY Create a connection for client1 using XOpenDisplay. Create a connection for client2 using XOpenDisplay. +Create a connection for client3 using XOpenDisplay. Create a window using XCreateWindow. Grab the server for the default display using XGrabServer. Create a process using tet_fork. In child process: - Generate a ChangeProperty request using XChangeProperty. + Generate a ChangeProperty request as client3 using XChangeProperty. Wait sufficient time for the ChangeProperty request to be processed. -Verify that no PropertyChange event has been generated by client2 using XCheckWindowEvent. +Verify as client1 that no PropertyChange event has been generated by client3 using XCheckWindowEvent. Close the client1 connection using xname. Wait suffient time for the ChangeProperty request to be processed. -Verify that a ChangeProperty request was generated by client2. +Verify as client2 that a ChangeProperty request was generated by client3. >>EXTERN int waittime = -1; +int fd = -1; Atom at; Window win; Display *client2; +Display *client3; char *atname = "XT_TEST_Atom"; static void t006p() @@ -419,6 +422,7 @@ sleep(waittime); + XSync(client2, False); if(XCheckWindowEvent(client2, win, PropertyChangeMask, &ev) == False) { report("%s() did not ungrab the server.", TestName); FAIL; @@ -435,8 +439,8 @@ val = 666; settimeout(waittime * 3); - XChangeProperty(client2, win, at, XA_INTEGER, 32, PropModeReplace, (unsigned char *) &val, 1); - XFlush(client2); + XChangeProperty(client3, win, at, XA_INTEGER, 32, PropModeReplace, (unsigned char *) &val, 1); + XFlush(client3); cleartimeout(); exit(0); } @@ -460,15 +464,26 @@ return; } + client3 = XOpenDisplay(config.display); + + if(client3 == (Display *) NULL) { + delete("XOpenDisplay() returned NULL."); + XCloseDisplay(display); + XCloseDisplay(client2); + return; + } + fd = ConnectionNumber(client3); + XSelectInput(client2, win, PropertyChangeMask); XSelectInput(display, win, PropertyChangeMask); at = XInternAtom(display, atname, False); + XSync(client2, False); XGrabServer(display); XSync(display, False); - XFlush(client2); if(tet_fork(t006c, t006p, waittime, 1) == TIMEOUT_EXIT) delete("Child process timed out."); + close(fd); >>ASSERTION Good B 1 A call to xname releases all passive grabs made by the client. Index: tset/Xlib10/grbsrvr/grbsrvr.m =================================================================== RCS file: /cvs/xtest/xts5/tset/Xlib10/grbsrvr/grbsrvr.m,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 grbsrvr.m --- tset/Xlib10/grbsrvr/grbsrvr.m 15 Apr 2005 14:05:15 -0000 1.1.1.2 +++ tset/Xlib10/grbsrvr/grbsrvr.m 8 Sep 2005 02:23:23 -0000 @@ -133,7 +133,7 @@ >>CODE client1 = opendisplay(); - client2 = opendisplay(); + client2 = XOpenDisplay(config.display); win = defwin(Dsp); XSelectInput(client1, win, PropertyChangeMask); Index: tset/Xlib10/ungrbsrvr/ungrbsrvr.m =================================================================== RCS file: /cvs/xtest/xts5/tset/Xlib10/ungrbsrvr/ungrbsrvr.m,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ungrbsrvr.m --- tset/Xlib10/ungrbsrvr/ungrbsrvr.m 15 Apr 2005 14:05:16 -0000 1.1.1.2 +++ tset/Xlib10/ungrbsrvr/ungrbsrvr.m 8 Sep 2005 02:23:23 -0000 @@ -131,7 +131,7 @@ >>CODE int ret; - client2 = opendisplay(); + client2 = XOpenDisplay(config.display); win = defwin(Dsp); XSelectInput(display, win, PropertyChangeMask);