toml@ninja.Solbourne.COM (Tom LaStrange) (08/30/90)
As many of you have no doubt seen, tvtwm has shown up in comp.sources.x. But as many of you also know, as soon as you send some software off, you find some more problems that you would like to get fixed. Anyway, the sources posted to comp.windows.x are now a whole day old and there is already a patch file to bring it up to patchlevel 1. That will show up in comp.sources.x sometime in the near future. I have also placed a copy in contrib/tvtwm.tar.Z on expo. The version on expo is the latest stuff and is already at patchlevel 1, no need to apply the forthcoming patches. What is tvtwm? It's a version of twm with a Virtual Desktop modeled after swm (Solbourne Window Manager). It took me all of two and a half days to get the major stuff written and its been in use for a whole three days by Dave Lemke and some of his buddies at NCD (Thanks Dave!). I'm including the README.tvtwm file here so you can decide if you want to grab it. -- Tom LaStrange Solbourne Computer Inc. ARPA: toml@Solbourne.COM 1900 Pike Rd. UUCP: ...!{boulder,sun}!stan!toml Longmont, CO 80501 ------------------ README.tvtwm ----------------------- For those of you like me who want to try software before reading the instructions, all you have to do to get started is add a single line to your .twmrc file. Something like this: VirtualDesktop "3000x2000" Now for the verbose description: This is yet another, different implementation of the Virtual Desktop concept for twm. I call this version tvtwm (Tom's Virtual twm). It is based on the R4 version of twm with up to fix-14 installed. This implementation is modeled after swm (Solbourne Window Manager) and includes the very nice ability to move windows into and out of the panner. It should be noted that none of this code came from the vtwm implementation. If you have problems and/or patches you can email me at the address at the end of this file. If we look at different implementations of the Virtual Desktop, I think we can relate them to soft drinks: swm - Classic Coke "The Real Thing" tvtwm - Diet Coke "Same as Coke but not as sweet" vtwm - Diet Pepsi "Not as sweet as Coke, some people may prefer it to any flavor of Coke" There are pros and cons to the vtwm and swm/tvtwm implementations. Most revolve around whether or not to use an additional window for the scrolling desktop or to simply move windows around on the actual root window. vtwm moves windows on the actual root window, swm/tvtwm use an additional window to perform the scrolling. Pros: vtwm Simple to implement. Programs like xsetroot continue to work. tvtwm Half the network traffic when the desktop scrolls, only a ConfigureNotify event has to be sent. Faster scrolling of the desktop. Desktop background image will actually scroll. Opens the door for possible multiple Virtual Desktop windows. Cons: vtwm Twice as much network traffic when the desktop scrolls, each window has to be moved and then a ConfigureNotify event must be sent. Slower scrolling of the desktop. Desktop background image does not scroll. tvtwm Programs like xsetroot no longer work, additional work needs to be done to find the Virtual Desktop window. Programs that attempt to find the size of the window manager decoration may fail if the traverse the window tree until they run into the actual root window. The ICCCM states that more work needs to be done in the area of virtual root windows, so there isn't any clear answer on the right way to implement this feature. Having said that, let me describe how I've butchered the code, what currently doesn't work, what would be nice if it worked, etc. 1. First a description of how the panner works. Basically, mouse button 1 allows you to change your position in the desktop. Mouse button 2 allows you to drag any of the small "virtual" windows. During a window move operation you can move the pointer into and out of the panner. Resizing the panner will of course resize the desktop. 2. I completely re-wrote the window move code. In menus.c I simply commented out the window move code that is there and didn't touch any code related to window moves in events.c. The new window move code is in a new file called move.c. 3. Opaque moves look kind of strange when dragging windows in and out of the panner, but they do the right thing. DontMoveOff has not been fixed to work properly with the desktop. 4. Rather than the f.nail and "NailedDown" features of vtwm, tvtwm uses the same terminology as swm. In tvtwm, windows that do not move when the desktop is panned are called "sticky" windows. There is a command called f.stick and a "Sticky" list of windows that will be sticky when started. Also, a side effect/feature of the way sticky windows are impemented means that sticky windows will always be on top of non-sticky windows. The sticky-ness of a window is remembered during an f.restart if RestartPreviousState is set. 5. USPosition vs. PPosition - When a window has USPosition hints set, the window will be positioned at that exact pixel location. When PPosition hints are set, the window will be positioned at the pixel location plus the current offset of the Virtual Desktop. For example, if the desktop has been panned to +200+500 and a window is mapped with PPosition +100+100, the window will be positioned at +300+600 on the desktop. 6. How does the icon gravity stuff work in relation to different areas of the Virtual Desktop? I don't know, and I don't really have the time to look into the problem. It might be nice to have seperate icon regions in different quadrants of the Virtual Desktop. If you use icon managers and make them sticky then you don't have any problems. 7. The small "virtual" windows in the panner will have the same color as their corresponding window titlebars and icons have. 8. The initialization files .tvtwmrc.<screen number> and .tvtwmrc will be attempted before .twmrc.<screen number> .twmrc. New Variables: VirtualDesktop "WIDTHxHEIGHT" This variable simply specified the initial size of the Virtual Desktop. Specifying this variable enables the Virtual Desktop feature. Why didn't I use the same syntax as vtwm and also specify the panner scale and geometry? I don't know, lazy I guess. VirtualDesktopBackgroundPixmap "filename" The pixmap image to display as the background of the Virtual Desktop window. VirtualDesktopBackground "color" The background color of the VirtualDesktop window. If VirtualDesktopBackgroundPixmap is not set, the VirtualDesktop will have a solid background of this color. VirtualDesktopForeground "color" This color is only used if VirtualDesktopBackgroundPixmap is set. PannerGeometry "+-X+-Y" Specifies the geometry at which the panner is to be placed. The default is "-0-0". PannerState "state" This specifies the initial state of the panner. Possible values include "withdrawn", "iconic", and "normal". The default state is "normal". PannerScale scale This specifies the scale of the panner. The default number is 20. PannerBackgroundPixmap "filename" The pixmap image to display as the background of the panner window. PannerBackground "color" The background color of the panner window. If PannerBackgroundPixmap is not set, the panner will have a solid background of this color. PannerForeground "color" This color is only used if PannerBackgroundPixmap is set. Sticky { window list } A list of windows that will come up in a sticky state. New Commands: f.panner - toggle making the panner visible f.scrollhome - scroll the desktop to 0,0 f.scrollup - scroll the desktop up one screenful f.scrolldown - scroll the desktop down one screenful f.scrollleft - scroll the desktop left on screenful f.scrollright - scroll the desktop right on screenful f.panup - same as f.scrollup f.pandown - same as f.scrolldown f.panleft - same as f.scrollleft f.panright - same as f.scrollright f.stick - toggle making a window sticky or not A version of xsetroot, called ssetroot has been included as an example of how to find the Virtual Desktop window. -- Tom LaStrange Solbourne Computer Inc. ARPA: toml@Solbourne.COM 1900 Pike Rd. UUCP: ...!{boulder,sun}!stan!toml Longmont, CO 80501
jv@mh.nl (Johan Vromans) (08/31/90)
In article <1990Aug30.142709.1196@Solbourne.COM> toml@ninja.Solbourne.COM (Tom LaStrange) writes: > ... tvtwm has shown up in comp.sources.x. ... > This is yet another, different implementation of the Virtual Desktop > concept for twm. I call this version tvtwm (Tom's Virtual twm). It is > based on the R4 version of twm with up to fix-14 installed. How dependent is tvtwm on R4? I tried to get it running on R3, and succeeded with the following fixes: gram.c - deleted #include <X11/Xmu/CharSet.h> iconmgr.c - deleted #include <X11/Xmu/CharSet.h> - fixed (*compar) to strcmp menus.c - deleted #include <X11/bitmaps/menu12> - substituted another bitmap for menu12 parse.c - deleted #include <X11/Xmu/CharSet.h> util.c - deleted #include <X11/Xmu/CharSet.h> - deleted #include <X11/Xmu/Drawing.h> - substituted "strcmp" for "XmuCompareISOLatin1 - eliminated the calls to "XmuLocateBitmapFile" and "XmuDrawLogo" Imakefile - eliminated the reference to the extension library. After these mods, tvtwm compiles, links and runs fine. Is this ok, or am I overlooking something? Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500 ------------------------ "Arms are made for hugging" -------------------------
janssen@parc.xerox.com (Bill Janssen) (09/05/90)
Thanks, Tom! Nice bit of work. I hauled Stu Card over to look at it, and he immediately said, "I've seen that before!" We went back to his office, and he pulled out the Rooms article reprint from TOG[1]. Sure enough, on page 239 there's a screen dump of something captioned "BigScreen". It has 5 or 6 windows on it (InterLisp windows), and up in the top there's a little window, looking for all the world like a virtual desktop window on vtwm or tvtwm, but called an "overview". BigScreen is a precursor of Xerox Rooms. There's one idea in BigScreen that I haven't noticed in [t]vtwm. The user can place "labels" (rectangles with big text in them) around the screen surface. The labels are shown in the overview as little plus signs, and serve as registration points for the outline of the screen in the overview. The caption has one warning note: "This system was considered unsatisfactory because of the need to have the same window in more than one location in the workspace." Stu says it also got too confusing, as the little labels proliferated in the overview. [1] D. Austin Henderson, Jr., and Stuart K. Card, "Rooms: The Use of Workspaces to Reduce Space Contention in a Window-Based Graphical User Interface", ACM Transactions on Graphics, vol. 5, no. 3, July 1986, pp. 211-243. [Anyone interested in different ways to manage screen complexity should take a look at this paper, as it discusses several different techniques, and compares and contrasts them.] Bill -- Bill Janssen janssen@parc.xerox.com (415) 494-4763 Xerox Palo Alto Research Center 3333 Coyote Hill Road, Palo Alto, California 94304