From xemacs-m  Tue Jan 14 11:54:34 1997
Received: from black-ice.cc.vt.edu (root@black-ice.cc.vt.edu [128.173.14.71])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id LAA17174 for <xemacs-beta@xemacs.org>; Tue, 14 Jan 1997 11:54:33 -0600 (CST)
Received: from black-ice.cc.vt.edu (valdis@LOCALHOST [127.0.0.1])
          by black-ice.cc.vt.edu (8.8.4/8.8.4) with ESMTP
	  id MAA20970; Tue, 14 Jan 1997 12:54:24 -0500
Message-Id: <199701141754.MAA20970@black-ice.cc.vt.edu>
X-Mailer: exmh version 2.0beta 12/23/96
To: Anders Stenman <stenman@isy.liu.se>
Cc: turner@lanl.gov, xemacs-beta@xemacs.org
Subject: Re: automatic de-iconify in 20-b34 w/ byte-recompile-directory 
In-Reply-To: Your message of "Tue, 14 Jan 1997 09:41:41 +0100."
             <199701140841.JAA06581@ludde.isy.liu.se> 
From: Valdis.Kletnieks@vt.edu
X-Url: http://black-ice.cc.vt.edu/~valdis/
References: <199701060128.UAA11198@spacely.icd.teradyne.com> 
 <199701140419.XAA17368@spacely.icd.teradyne.com> <QQbyki29097.199701140512@crystal.WonderWorks.COM> <m2vi90bxve.fsf@altair.xemacs.org> <199701140628.XAA05868@branagh.lanl.gov>
            <199701140841.JAA06581@ludde.isy.liu.se>
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="==_Exmh_1823715050P";
	micalg=pgp-md5; protocol="application/pgp-signature"
Content-Transfer-Encoding: 7bit
Date: Tue, 14 Jan 1997 12:54:22 -0500

--==_Exmh_1823715050P
Content-Type: text/plain; charset=us-ascii

On Tue, 14 Jan 1997 09:41:41 +0100, Anders Stenman said:
> I had this problem too (in 19.14 & CDE), but I discovered that setting the
> variable 'allow-deletion-of-last-visible-frame' to t in some sense solves
> the problem.

Yeah, that was exactly why I invented that variable  ;)

But alas, although I've been poking around the CDE documentation,
I've not found exactly what XEmacs is doing that makes CDE decide
that it needs to pop the frame to the current workspace.

Hmm.. lesse.. using 'rxvt' (2.19)  as a terminal window, echoing a ^G to ring
the bell causes a workspace switch, but it does *NOT* do so
for xterm (at least the IBM AIX 4.2.0 version).

The difference seems to be that rxvt (at least with the config options I have 
set)
does an 'XMapWindow(xXdisplay, TermWin.parent)';"  to de-iconify on an
"alert" (defined as a control G beep on the terminal)..  CDE, in its infinite
wisdom, decides that an XMapWindow() call should map it on the
current virtual desktop, even if it's mapped elsewhere already.

Unfortunately, other than hacking up Xemacs to be more careful regarding
XMapWindow(), the only other solution I can find is in the CDE documentation:

So- do we want to bite the bullet and get into ALL the CDE stuff?

Preventing Application Movement Among Workspaces
The function DtWsmRemoveWorkspaceFunctions prevents an application from:
	Switching from one workspace to another
	Occupying all workspaces
	Being removed from the current workspace

DtWsmRemoveWorkspaceFunctions does this by making that portion of the
desktop Workspace Manager (dtwm) window menu inactive. The application
should call DtWsmRemoveWorkspaceFunctions before its top-level window
is mapped because dtwm only checks workspace information at the time
it manages the application's top-level window. If you need to call
DtWsmRemoveWorkspaceFunctions after the application's top-level window
is managed, then you must first call the Xlib function
XWithdrawWindow, call DtWsmRemoveWorkspaceFunctions, and then call
XMapWindow to remap the top-level window.

To Prevent Movement to Another Workspace
	 Use DtWsmRemoveWorkspaceFunctions.
DtWsmRemoveWorkspaceFunctions(XtDisplay(toplevel),
                              XtWindow(toplevel));
where:
	XtDisplay(toplevel) is the X display.
	XtWindow(toplevel) is the window for which workspace movement is to be 
prevented.


-- 
				Valdis Kletnieks
				Computer Systems Engineer
				Virginia Tech



--==_Exmh_1823715050P
Content-Type: application/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.2

iQCVAwUBMtvIS9QBOOoptg9JAQEfjgQAjeHrKQh/mkWrWUYeNFY5olIMIbJ27Z4M
VrSzOV7cHOe4kxQR4crN7CZUQw7H++oxSWEexcvu0pTHIJNTWQ9BshAkG8pR5pQx
KHZ0Y71U32rU+K8qjNOAk98LO1WdtaDrMAkGwiMdBlMPJ5wAhDf2CzWetMBUmYUo
4NsqbvTvbB4=
=mRX/
-----END PGP MESSAGE-----

--==_Exmh_1823715050P--

