sjs@spectral.ctt.bellcore.com (Stan Switzer) (06/20/89)
Frode L. Odegard (frode@m2cs.uu.no) writes: > I've been speculating...maybe framebuffer could become a function > that actually returns 'currentframebuffer' and maybe 'currentframebuffer' > could be set when the user moves the cursor from one monitor to another? > I haven't been really deep into the low-level code for event handling > but it'd be fun to hear what the NeWS experts have to say on this. Most of what you need is in WinWin. It turns out to be a bit difficult because you have to take care of a number of things: 1) As noted, you have to replace "framebuffer" with something that returns the current framebuffer. 2) You have to start a new window manager to handle root damage and to provide a root menu. 3) You have to fork a new server for the new device if you want to be able to create UNIX-initiated windows in it. 4) You have to replace "forkunix" with something that connects to the right server. This is messy because the forkunix primitive has already been autobound into various things, notably the root menu procs. You'll have to undo this. 5) You have to redefine "fboverlay" to correspond to the proper framebuffer. 6) Unlike all others canvases, NeWS makes children of "framebuffer" transparent and, if B&W, retained. This probably applies to children of any "device" canvas, but you should check. 7) If you use a window class that shares menus (like, for instance "neatwin" or "quickwin" you will have to deal with the fact that menus retain canvases and that the canvases are parented to one framebuffer or another. I jammed in some code to reparent them. 8) You'll have to figure out what you want "AllWin" to do. 9) You'll have to figure out where you want to put these changes. There is no way to replace a process's "systemdict" so you may have to play games like keeping "framebuffer" as a variable in "userdict" and aranging to propogate it in the "server" process. 10) You'll have to figure out how to warp the mouse to another framebuffer. 11) When you get it done, send me a copy! Stan Switzer sjs@ctt.bellcore.com
frode@m2cs.uu.no (Frode Odegard) (07/22/89)
A few days ago I browsed trough the init.ps file and discovered that 'framebuffer' is created using 'createdevice'. Since I now have both a monochrome and a color monitor on my Sun-3/60C, I tried using createdevice to create OtherMonitor, and it worked. Then I opened a window on my other monitor and ...... one could actually write PS code to allow the user to open windows on any monitor, to move windows and icons from one monitor to another and.. does anyone know if X/NeWS includes PS code to do this? Having two monitors increases my productivity a LOT (especially since I can run Suntools (&Frame Maker) on my right side and NeWS on my left). I've been speculating...maybe framebuffer could become a function that actually returns 'currentframebuffer' and maybe 'currentframebuffer' could be set when the user moves the cursor from one monitor to another? I haven't been really deep into the low-level code for event handling but it'd be fun to hear what the NeWS experts have to say on this. - Frode -- _____________________________________________________________________ Frode L. Odegard, Modula-2 CASE Systems, Maridalsveien 139, N-0461 OSLO 4, NORWAY. Email: frode@m2cs.uu.no. For a full resume send mail to info@m2cs.uu.no (message must contain the command "resume frode").