Popping Up A Iconified Window

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Popping Up A Iconified Window

Submitted by Anonymous on Fri, 01/18/2002 - 19:38. Developers
I currently am working on a project that uses GUI`s coded in Motif 1.2. One of the requirements is that the window, if already running, should either popup to the top or de-iconify if another of the same name is started.
Now, I have a library that almost works. It makes use of XProperty to find out if the app is already running and also gets the Window and Display data. That all works fine. I even have it working as far as making the first run app. disappear using "XWithdrawWindow" when the second is started. And i have the second app. shutdown.
The problem is getting the first run app. to re-appear either at the top, when it is already mapped but obscured or to de-iconify. I tried calling "XRaiseWindow" and "XMapWindow" with no success.
I should also note that the app is still running as I see debug output in the terminal flash by.
Any thoughts/suggestions would be greatly appreciated.

steve---

ICS_support

The problem of having a single application running is handled in the article at http//www.motifzone.com/tmd/articles/John_Cwikla/single.html , in which the author says, "I was faced with the problem of having a
single instance of our application running at a time, and additionally have arguments passed to the running application for processing." The code there handles that problem.

The second problem may be simpler. The X FAQ, if I recall correctly -- and I`m a bit embarrassed at not having updated it in 5 years -- suggests using the combination of XIconifyWindow() and XMapRaised(). You can get to the faq via the page at http//www.motifzone.com/resources/other.html .

PS I`m not sure why you`re doing making the window disappear. Didn`t you want it to appear?