Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!Inference.COM!dfc From: dfc@Inference.COM (Deborah Catalano) Newsgroups: comp.windows.x.motif Subject: raising a widget Message-ID: <9101312218.AA04265@quaestor.Inference.COM> Date: 31 Jan 91 22:18:13 GMT References: <9101311618.AA05854@xuucp.ch.apollo.hp.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 55 From: jimg@apollo.com (hit "D" now) Date: Thu, 31 Jan 91 11:25:44 EST Sender: jimg@apollo.com There ought to be an answer to this, but I haven't found it. I have a client application that wants to notice when it is obscured by other windows and, under certain circumstances, wants to be raised to the top of the window stack. I can add an event handler to the toplevel shell widget and have it Map and Unmap itself, but making the window blink out and flash on again is ugly and messy. What I'd really like to do is just send a request to the window manager and ask it to raise my window to the top. I'm running mwm. Is there a way to do that? Yes, we had to do something similar. Use XConfigureWindow (if using X11R3) or XReconfigureWMWindow (if using X11R4). Note: you have to use the parent of the dialog box if using the Motif Dialog convenience routines (e.g., XmCreateFormDialog). Here's the code that works for me: /* Declarations....*/ XWindowChanges *winchgs = (XWindowChanges *)malloc(sizeof(XWindowChanges)); unsigned int value_mask; /* other code .... */ . . . winchgs->stack_mode = Above; value_mask = CWStackMode; #if X11R4 XReconfigureWMWindow(display, XtWindow(XtParent(dialog_widget)), screen_num, value_mask, winchgs); #else XConfigureWindow(display, XtWindow(XtParent(dialog_widget)), value_mask, winchgs); #endif /* end of code sample */ Good luck! ----------------------------------------------------------------------------- Debbie Catalano catalano@inference.com Inference Corporation 213-322-5004 x194 550 N. Continental Blvd. Fax: 213-322-3242 El Segundo, CA 90245 -----------------------------------------------------------------------------