home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume14 / olvwm / patch2.01 < prev    next >
Encoding:
Internet Message Format  |  1991-08-26  |  30.2 KB

  1. Path: uunet!cs.utexas.edu!sun-barr!cronkite.Central.Sun.COM!exodus!soliado.East.Sun.COM
  2. From: sdo@soliado.East.Sun.COM (Scott Oaks - Sun Consulting NYC)
  3. Newsgroups: comp.sources.x
  4. Subject: v14i007: olvwm - Open Look Virtual Window Manager, Patch2, Part01/03
  5. Message-ID: <19073@exodus.Eng.Sun.COM>
  6. Date: 27 Aug 91 05:59:29 GMT
  7. References: <csx-14i007-olvwm@uunet.UU.NET>
  8. Sender: news@exodus.Eng.Sun.COM
  9. Lines: 999
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: sdo@soliado.East.Sun.COM (Scott Oaks - Sun Consulting NYC)
  13. Posting-number: Volume 14, Issue 7
  14. Archive-name: olvwm/patch2.01
  15. Patch-To: olvwm:  Volume 12, Issues 57-72
  16. Patch-To: olvwm:  Volume 14, Issues 6
  17.  
  18. This patch contains a number of changes which are listed in the first part
  19. of this patchfile.  Most of the changes deal with new ways to move around
  20. in the desktop, and there are several minor bug fixes.
  21.  
  22. There are three files to this patch, they must all be applied in order
  23. for the new version to work.
  24.  
  25. Prereq: 1
  26. *** build/patchlevel.h    Sat Jun 22 20:52:43 1991
  27. --- src/patchlevel.h    Sat Jun 22 20:57:44 1991
  28. ***************
  29. *** 1 ****
  30. ! #define PATCHLEVEL 1
  31. --- 1 ----
  32. ! #define PATCHLEVEL 2
  33. *** build/CHANGES    Sat Jun 22 21:04:02 1991
  34. --- src/CHANGES    Sat Jun 22 14:28:29 1991
  35. ***************
  36. *** 0 ****
  37. --- 1,107 ----
  38. + FUNCTIONAL CHANGES:
  39. + 1)  New ways to move the desktop, including:
  40. +     A)  If a motion key is shifted, motion amount is doubled
  41. +     B)  If a motion key is pressed with the CTRL key, motion amount is halved
  42. +     C)  If a motion key is pressed with SHIFT/CTRL, motion amount is multiplied
  43. +     by 20, which should take it to the nearest edge
  44. +     D)  The function keys 1-10 can be used to move to a specific screen:
  45. +     screens are number across and then down from 1 to 10.
  46. +     E)  If a motion key is pressed with the META key, then it will work no
  47. +     matter where the keyboard focus is.
  48. +     F)  The MENU button within the VDM brings up a (pinnable) menu allowing
  49. +     motions.
  50. + 2)  Virtual Windows now react to mouse events and Front/Open keystrokes like
  51. +     any other window; they can be grouped, their frame menu displayed, etc.
  52. + 3)  New RelativePosition attribute added
  53. +     In past versions, by default, when the user specified a window
  54. +     placement, that position was used in absolute co-ordinates, and
  55. +     when a program specified a window placement, that position was
  56. +     used in relative co-ordinates.
  57. +     Some programs (frame and mailtool, for example) save some window
  58. +     states somewhere (frame does it in the document, mailtool in
  59. +     the .mailtool-init file) and then brings up these windows with
  60. +     user-specified co-ordinates.  This means that if you start these
  61. +     programs in another part of the Virtual Desktop, some frames will
  62. +     come up in the wrong area of the screen -- they will come up
  63. +     where they last were rather than where you are now.
  64. +     Setting the RelativePosition attribute to True (its default) will
  65. +     make all window placement strings be relative to the current
  66. +     screen.
  67. +     The only time this setting should be a problem is if you are
  68. +     any place other than the upper-left corner and you want to bring
  69. +     up a window in absolute co-ordinates.  But since absolute
  70. +     co-ordinates are normally only useful for things brought up in
  71. +     your .xinitrc/.openwin-init file, that shouldn't normally be
  72. +     a problem.
  73. +     
  74. + 4)  You can now specify sticky applications by the first word in their
  75. +     WM_NAME attribute as well as their WM_CLASS/WM_INSTANCE attribute.
  76. +     For some tools (eg Mailtool), the WM_NAME is multi-word:
  77. +     Mail Tool - /var/spool/mail/sdo for example; use only the first
  78. +     word (Mail) in the list as xrdb is incapable of imbedding spaces
  79. +     in the list.
  80. +     This allows (most) XView applications and pinned menus to be sticky.
  81. +     Note that the XView clock has by default no WM_NAME either; but
  82. +     it (and all XView applications) can set their name on the command
  83. +     line with -Wl <name>.
  84. + 5)  The VDM now displays a grid (by default, but it can be turned off by
  85. +     setting VirtualGrid to None) for screen sizes.  When the grid
  86. +     is on, dragging the mouse to move the desktop is constrained to move
  87. +     between whole screen regions (unless the CTRL button is pressed
  88. +     while dragging the mouse, in which case arbitrary positioning of
  89. +     the desktop is enabled).  If the grid is off, you can move the desktop
  90. +     by arbitrary amounts unless the CTRL button is pressed, in which case
  91. +     movement will be constrained to full screens.
  92. + BUG FIXES
  93. + 6)  Windows which don't register with the Window manager and are raised
  94. +     by the "Front" key no longer core dump.
  95. + 7) The Save Workspace command now correctly saves non-Xview applications.
  96. + 8) When olvwm is in MinimalDecor, it will resize correctly.
  97. + 9) Clients like xterm can now receive input focus if click-to-type is in
  98. +     effect and the inside of the window is clicked.
  99. + 10) Icons can now be moved into the VDM when SnapToGrid is in effect.
  100. + 11) Applications which start sticky can be unstuck.
  101. + 12)  Moving multiple windows into the VDM no longer collapses the windows
  102. +     onto each other.
  103. + 13)  The root now correctly inherits keyboard events when shells exit.
  104. + 14) Menus can now have embedded environmental variables
  105. + 15)  Sub-frames now inherit the stickyness of their parent.  Note that in
  106. +     the OPEN LOOK paradigm, this means that command frames and pinned
  107. +     menus will inherit the stickyness of their parent but any other
  108. +     base frames (e.g. the compose window from mailtool) will not.
  109. + 16)  olvwm now avoids the OW2.0 server bug for small windows on CG3 displays
  110. +     which used to cause the server to crash.
  111. + 17)  Windows can no longer be dropped into obscured portions of the VDM
  112. + SOURCE FIXES
  113. + 18)  Imakefile now lists resources1.o
  114. +     [Okay, I said I was no Imake user . . .]
  115. + 19)  Imakefile no longer tries to install openwin-menu
  116. + 20)  Imakefile correctly installs man page
  117. + 21)  New Imakefile for those without MIT XView but with OpenWindows
  118. *** build/Imakefile    Sat Jun 22 20:08:33 1991
  119. --- src/Imakefile    Sat Jun 22 20:56:21 1991
  120. ***************
  121. *** 14,24 ****
  122.       defaults.h events.h globals.h group.h list.h mem.h menu.h notice.h \
  123.           olcursor.h olwm.h resources.h slots.h st.h win.h
  124.   
  125. - INFOFILES =
  126. - MANPAGES = olvwm.man
  127.   BITMAPS = iconbitmap.h vdm.icon
  128. - SCRIPTS =
  129. - MISC     = openwin-menu
  130.   
  131.   SRCS =     \
  132.       Debug.c Notice.c Error.c \
  133. --- 14,20 ----
  134. ***************
  135. *** 38,44 ****
  136.           usermenu.o usleep.o win.o winbusy.o winbutton.o wincolor.o \
  137.           winframe.o wingframe.o winicon.o winipane.o winmenu.o \
  138.           winnofoc.o winpane.o winpush.o winresize.o winroot.o \
  139. !     virtual.o
  140.   
  141.   ALLFILES = \
  142.       ${HEADERS} ${BITMAPS} ${SRCS} \
  143. --- 34,40 ----
  144.           usermenu.o usleep.o win.o winbusy.o winbutton.o wincolor.o \
  145.           winframe.o wingframe.o winicon.o winipane.o winmenu.o \
  146.           winnofoc.o winpane.o winpush.o winresize.o winroot.o \
  147. !     virtual.o resources1.o
  148.   
  149.   ALLFILES = \
  150.       ${HEADERS} ${BITMAPS} ${SRCS} \
  151. ***************
  152. *** 45,53 ****
  153.       ${MISC} ${INFOFILES} ${MANPAGES} ${SCRIPTS}
  154.   
  155.   ComplexProgramTarget(olvwm)
  156. - InstallNonExecList($(MISC),$(LIBRARY_DEST))
  157. - InstallManPage($(MANPAGES),$(MANDIR))
  158.   
  159.   #include <XView.prog>
  160. --- 41,45 ----
  161. *** build/Imakefile.sun    Sat Jun 22 21:04:22 1991
  162. --- src/Imakefile.sun    Tue Apr 30 18:43:17 1991
  163. ***************
  164. *** 0 ****
  165. --- 1,18 ----
  166. + OLGXLIB = -L$(OPENWINHOME)/lib -lolgx
  167. + INCLUDES = -I$(OPENWINHOME)/include -I$(TOP)
  168. + DEPLIBS = $(DEPXLIB)
  169. + LOCAL_LIBRARIES = $(OLGXLIB) $(XLIB) -lm
  170. + SRCS =     \
  171. +     Debug.c Notice.c Error.c \
  172. +     InitGraphics.c RubberWin.c Select.c WinInfo.c \
  173. +     atom.c client.c defaults.c events.c group.c list.c \
  174. +     mem.c menu.c olwm.c resources.c services.c slots.c st.c states.c \
  175. +     usermenu.c usleep.c win.c winbusy.c winbutton.c wincolor.c \
  176. +     winframe.c wingframe.c winicon.c winipane.c winmenu.c \
  177. +     winnofoc.c winpane.c winpush.c winresize.c winroot.c \
  178. +     virtual.c resources1.c
  179. + OBJS =     $(SRCS:.c=.o)
  180. + ComplexProgramTarget(olvwm)
  181. *** build/LEGAL_NOTICE    Sat Jun 22 20:08:53 1991
  182. --- src/LEGAL_NOTICE    Sun May 19 20:05:34 1991
  183. ***************
  184. *** 1,7 ****
  185.   This code is based on the OLWM code distributed with X11R4.  In addition,
  186.   I looked heavily at the public versions of tvtwm (though none of that code
  187.   is included directly, and hence the copyright notice from Solboure is
  188. ! included more for safety than anything else).
  189.   
  190.       NOTICE TO USER: The source code, including the glyphs or icons 
  191.       forming a par of the OPEN LOOK TM Graphic User Interface, on this 
  192. --- 1,9 ----
  193.   This code is based on the OLWM code distributed with X11R4.  In addition,
  194.   I looked heavily at the public versions of tvtwm (though none of that code
  195.   is included directly, and hence the copyright notice from Solboure is
  196. ! included more for safety than anything else).  All code not covered by
  197. ! the copyrights listed below is (c) Copyright 1991 by Scott Oaks and may
  198. ! be used royalty-free in non-commercial software.
  199.   
  200.       NOTICE TO USER: The source code, including the glyphs or icons 
  201.       forming a par of the OPEN LOOK TM Graphic User Interface, on this 
  202. *** build/Makefile.sunpro    Sat Jun 22 20:08:33 1991
  203. --- src/Makefile.sunpro    Sat Jun 22 21:13:46 1991
  204. ***************
  205. *** 1,6 ****
  206.   .KEEP_STATE:
  207.   
  208. ! DEBUG = -O
  209.   CFLAGS = ${DEBUG} -I${OPENWINHOME}/include
  210.   LDFLAGS = -L${OPENWINHOME}/lib ${DEBUG}
  211.   LIBS = -lolgx -lX11 -lm
  212. --- 1,6 ----
  213.   .KEEP_STATE:
  214.   
  215. ! DEBUG = -O4
  216.   CFLAGS = ${DEBUG} -I${OPENWINHOME}/include
  217.   LDFLAGS = -L${OPENWINHOME}/lib ${DEBUG}
  218.   LIBS = -lolgx -lX11 -lm
  219. *** build/README    Sat Jun 22 20:08:34 1991
  220. --- src/README    Fri Apr 26 17:30:33 1991
  221. ***************
  222. *** 19,24 ****
  223. --- 19,29 ----
  224.   or corrections of this code, please send the new code (or diffs) to me
  225.   and I will try to include them in later versions.
  226.   
  227. + olvwm is compatible with and X11R4 server (though it's only been tested
  228. + on Sun OPENWINDOWS 2.0 and the Sun X11R4 MIT server).  It should run
  229. + on Sun's OPENWINDOWS 3.0-beta (if you're lucky enough to be a beta site)
  230. + but it does not manage NeWS windows in any OPENWINDOWS release.
  231.   Please read the LEGAL_NOTICE for information about distributing this
  232.   code.
  233.   
  234. *** build/RubberWin.c    Sat Jun 22 20:09:29 1991
  235. --- src/RubberWin.c    Sat Jun 22 20:56:14 1991
  236. ***************
  237. *** 6,12 ****
  238.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  239.    */
  240.   
  241. ! static char sccsid[]=  "@(#)RubberWin.c    1.2 olvwm version 3/30/91";
  242.   
  243.   /*
  244.    * Based on
  245. --- 6,12 ----
  246.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  247.    */
  248.   
  249. ! static char sccsid[]=  "@(#)RubberWin.c    1.3 olvwm version 6/22/91";
  250.   
  251.   /*
  252.    * Based on
  253. ***************
  254. *** 51,60 ****
  255.   static int    VDMLocX, VDMLocY;
  256.   static int    check_vdm;
  257.   extern Window    VDM, VDMFrame;
  258.   extern int    VDMWidth, VDMHeight;
  259. ! extern int VDMOutlineX, VDMOutlineY;
  260. ! static int    InVDM = 0;
  261. ! static int    StartInVDM = 0;
  262.   
  263.   #ifndef TRUE
  264.   #define FALSE 0
  265. --- 51,61 ----
  266.   static int    VDMLocX, VDMLocY;
  267.   static int    check_vdm;
  268.   extern Window    VDM, VDMFrame;
  269. + extern int    VirtualDesktopX, VirtualDesktopY;
  270. + extern int    VirtualDesktopWidth, VirtualDesktopHeight;
  271.   extern int    VDMWidth, VDMHeight;
  272. ! extern int    VDMOutlineX, VDMOutlineY;
  273. ! int        InVDM;
  274.   
  275.   #ifndef TRUE
  276.   #define FALSE 0
  277. ***************
  278. *** 143,151 ****
  279.       mstuff.initX = first->xbutton.x_root;
  280.       mstuff.initY = first->xbutton.y_root;
  281.   
  282. -     InVDM = 0;
  283. -     StartInVDM = 0;
  284.       if (first->xbutton.state & ShiftMask) {
  285.       invertMoveWindow = True;
  286.       GRV.DragWindow = !GRV.DragWindow;
  287. --- 144,149 ----
  288. ***************
  289. *** 240,270 ****
  290.       if (!GRV.DragWindow)
  291.           (void) ListApply(mstuff->winlist, drawOneBox, mstuff);
  292.   
  293. !     if (check_vdm) {
  294. !         switch(InVDM) {
  295. !             case 1:
  296. !             if (event->xmotion.x_root < VDMLocX ||
  297. !                 event->xmotion.x_root > VDMLocX + VDMWidth ||
  298. !                 event->xmotion.y_root < VDMLocY ||
  299. !                 event->xmotion.y_root > VDMLocY + VDMHeight) {
  300. !                 InVDM = 0;
  301. !             }
  302. !             break;
  303. !             case 0:
  304. !             if (event->xmotion.x_root > VDMLocX &&
  305. !                 event->xmotion.x_root < VDMLocX + VDMWidth &&
  306. !                 event->xmotion.y_root > VDMLocY &&
  307. !                 event->xmotion.y_root < VDMLocY + VDMHeight) {
  308. !                 InVDM = 1;
  309. !             }
  310. !             break;
  311. !         }
  312. !     }
  313.   
  314. !     mstuff->offX = (event->xmotion.x_root - mstuff->initX
  315.               + mstuff->rounder) / mstuff->divider;
  316. !     mstuff->offY = (event->xmotion.y_root - mstuff->initY
  317.               + mstuff->rounder) / mstuff->divider;
  318.   
  319.       if ((event->xmotion.state & ControlMask) != 0) {
  320.           if (ABS(mstuff->offX) > ABS(mstuff->offY))
  321. --- 238,265 ----
  322.       if (!GRV.DragWindow)
  323.           (void) ListApply(mstuff->winlist, drawOneBox, mstuff);
  324.   
  325. !     if (check_vdm)
  326. !         if (event->xmotion.subwindow == VDMFrame)
  327. !         InVDM = 1;
  328. !         else
  329. !         InVDM = 0;
  330. !     else InVDM = 0;
  331.   
  332. !     if (InVDM) {
  333. !         mstuff->offX = (event->xmotion.x_root - VDMLocX) *
  334. !                 (GRV.VDMScale / mstuff->divider) -
  335. !                 mstuff->initX + VirtualDesktopX;
  336. !         mstuff->offY = (event->xmotion.y_root - VDMLocY) *
  337. !                 (GRV.VDMScale / mstuff->divider) -
  338. !                 mstuff->initY + VirtualDesktopY;
  339. !     }
  340. !     else {
  341. !         mstuff->offX = (event->xmotion.x_root - mstuff->initX
  342.               + mstuff->rounder) / mstuff->divider;
  343. !         mstuff->offY = (event->xmotion.y_root - mstuff->initY
  344.               + mstuff->rounder) / mstuff->divider;
  345. +     }
  346.   
  347.       if ((event->xmotion.state & ControlMask) != 0) {
  348.           if (ABS(mstuff->offX) > ABS(mstuff->offY))
  349. ***************
  350. *** 300,326 ****
  351.   {
  352.       int pixw = DisplayWidth(win->core.client->dpy, win->core.client->screen);
  353.       int pixy = DisplayHeight(win->core.client->dpy, win->core.client->screen);
  354. !     int hpoint;
  355.   
  356. -     if (check_vdm && InVDM) {
  357. -     if (StartInVDM) {
  358. -         *pox = mstuff->offX * GRV.VDMScale + VDMOutlineX;
  359. -         *poy = mstuff->offY * GRV.VDMScale + VDMOutlineY;
  360. -     }
  361. -     else {
  362. -         *pox = (mstuff->initX + mstuff->offX - VDMLocX - VDMOutlineX)
  363. -             * GRV.VDMScale - win->core.x;
  364. -         *poy = (mstuff->initY + mstuff->offY - VDMLocY - VDMOutlineY)
  365. -             * GRV.VDMScale - win->core.y;
  366. -     }
  367. -     return;
  368. -     }
  369. -     else if (StartInVDM) {
  370. -     *pox = mstuff->initX + mstuff->offX - win->core.x;
  371. -     *poy = mstuff->initY + mstuff->offY - win->core.y;
  372. -     return;
  373. -     }
  374.       if (mstuff->offX == 0)
  375.       {
  376.       *pox = 0;
  377. --- 295,302 ----
  378.   {
  379.       int pixw = DisplayWidth(win->core.client->dpy, win->core.client->screen);
  380.       int pixy = DisplayHeight(win->core.client->dpy, win->core.client->screen);
  381. !     int    hpoint;
  382.   
  383.       if (mstuff->offX == 0)
  384.       {
  385.       *pox = 0;
  386. ***************
  387. *** 328,347 ****
  388.       else if (mstuff->offX > 0)
  389.       {
  390.           hpoint = pixw - win->core.x - win->core.width;
  391. !         if ((mstuff->offX >= hpoint) && (mstuff->offX <= hpoint + GRV.EdgeThreshold))
  392.           *pox = hpoint;
  393. !     else if (mstuff->offX >= hpoint+win->core.width-Resize_width)
  394. !         *pox = hpoint+win->core.width-Resize_width;
  395. !     else
  396. !         *pox = mstuff->offX;
  397.       }
  398.       else if (mstuff->offX < 0)
  399.       {
  400. !         if ((mstuff->offX <= -win->core.x) &&
  401.           (mstuff->offX >= -win->core.x - GRV.EdgeThreshold))
  402.           *pox = -win->core.x;
  403. !     else if (mstuff->offX <= -win->core.x - win->core.width + Resize_width)
  404. !         *pox = -win->core.x - win->core.width + Resize_width;
  405.       else
  406.           *pox = mstuff->offX;
  407.       }
  408. --- 304,330 ----
  409.       else if (mstuff->offX > 0)
  410.       {
  411.           hpoint = pixw - win->core.x - win->core.width;
  412. !         if (!InVDM && (mstuff->offX >= hpoint) &&
  413. !             (mstuff->offX <= hpoint + GRV.EdgeThreshold))
  414.           *pox = hpoint;
  415. !     else {
  416. !         hpoint = VirtualDesktopWidth + VirtualDesktopX -
  417. !                 win->core.x - win->core.width;
  418. !         if (mstuff->offX >= hpoint + win->core.width - Resize_width)
  419. !             *pox = hpoint + win->core.width - Resize_width;
  420. !         else
  421. !             *pox = mstuff->offX;
  422. !     }
  423.       }
  424.       else if (mstuff->offX < 0)
  425.       {
  426. !         if (!InVDM && (mstuff->offX <= -win->core.x) &&
  427.           (mstuff->offX >= -win->core.x - GRV.EdgeThreshold))
  428.           *pox = -win->core.x;
  429. !     else if (mstuff->offX <= -win->core.x - win->core.width +
  430. !                     Resize_width + VirtualDesktopX)
  431. !         *pox = -win->core.x - win->core.width +
  432. !                     Resize_width + VirtualDesktopX;
  433.       else
  434.           *pox = mstuff->offX;
  435.       }
  436. ***************
  437. *** 353,371 ****
  438.       else if (mstuff->offY > 0)
  439.       {
  440.           hpoint = pixy - win->core.y - win->core.height;
  441. !         if ((mstuff->offY >= hpoint) && (mstuff->offY <= hpoint + GRV.EdgeThreshold))
  442.           *poy = hpoint;
  443. !     else if (mstuff->offY >= hpoint+win->core.height-Resize_height)
  444. !         *poy = hpoint+win->core.height-Resize_height;
  445. !     else
  446. !         *poy = mstuff->offY;
  447.       }
  448.       else if (mstuff->offY < 0)
  449.       {
  450. !         if ((mstuff->offY <= -win->core.y) && (mstuff->offY >= (-win->core.y - GRV.EdgeThreshold)))
  451.           *poy = -win->core.y;
  452. !     else if (mstuff->offY <= (-win->core.y-win->core.height+Resize_height))
  453. !         *poy = (-win->core.y-win->core.height+Resize_height);
  454.       else
  455.           *poy = mstuff->offY;
  456.       }
  457. --- 336,362 ----
  458.       else if (mstuff->offY > 0)
  459.       {
  460.           hpoint = pixy - win->core.y - win->core.height;
  461. !         if (!InVDM && (mstuff->offY >= hpoint) &&
  462. !             (mstuff->offY <= hpoint + GRV.EdgeThreshold))
  463.           *poy = hpoint;
  464. !     else {
  465. !         hpoint = VirtualDesktopHeight + VirtualDesktopY -
  466. !                 win->core.y - win->core.height;
  467. !         if (mstuff->offY >= hpoint+win->core.height-Resize_height)
  468. !             *poy = hpoint+win->core.height-Resize_height;
  469. !         else
  470. !             *poy = mstuff->offY;
  471. !     }
  472.       }
  473.       else if (mstuff->offY < 0)
  474.       {
  475. !         if (!InVDM && (mstuff->offY <= -win->core.y) &&
  476. !         (mstuff->offY >= (-win->core.y - GRV.EdgeThreshold)))
  477.           *poy = -win->core.y;
  478. !     else if (mstuff->offY <= -win->core.y - win->core.height +
  479. !                     Resize_height + VirtualDesktopY)
  480. !         *poy = -win->core.y - win->core.height +
  481. !                 Resize_height + VirtualDesktopY;
  482.       else
  483.           *poy = mstuff->offY;
  484.       }
  485. ***************
  486. *** 390,397 ****
  487.           win->core.x + offX,
  488.           win->core.y + offY);
  489.       XMoveWindow(mstuff->dpy, cli->virtualWindow,
  490. !         (win->core.x + offX) / GRV.VDMScale + VDMOutlineX,
  491. !         (win->core.y + offY) / GRV.VDMScale + VDMOutlineY);
  492.       return (void *) 0;
  493.   }
  494.   
  495. --- 381,388 ----
  496.           win->core.x + offX,
  497.           win->core.y + offY);
  498.       XMoveWindow(mstuff->dpy, cli->virtualWindow,
  499. !         (win->core.x + offX - VirtualDesktopX) / GRV.VDMScale,
  500. !         (win->core.y + offY - VirtualDesktopY) / GRV.VDMScale);
  501.       return (void *) 0;
  502.   }
  503.   
  504. ***************
  505. *** 415,422 ****
  506.              w->core.y + offY,
  507.              w->core.width, w->core.height);
  508.      drawDouble(mstuff->dpy, VDM, RootGC,
  509. !         (w->core.x + offX) / GRV.VDMScale + VDMOutlineX,
  510. !         (w->core.y + offY) / GRV.VDMScale + VDMOutlineY,
  511.              w->core.width / GRV.VDMScale,
  512.              w->core.height / GRV.VDMScale);
  513.       return (void *) 0;
  514. --- 406,413 ----
  515.              w->core.y + offY,
  516.              w->core.width, w->core.height);
  517.      drawDouble(mstuff->dpy, VDM, RootGC,
  518. !         (w->core.x + offX - VirtualDesktopX) / GRV.VDMScale,
  519. !         (w->core.y + offY - VirtualDesktopY) / GRV.VDMScale,
  520.              w->core.width / GRV.VDMScale,
  521.              w->core.height / GRV.VDMScale);
  522.       return (void *) 0;
  523. ***************
  524. *** 527,534 ****
  525.         (diff > (i2) ? ((i)-diff) : (-diff))                \
  526.       )
  527.   
  528. -     InVDM = 0;
  529. -     StartInVDM = 0;
  530.       /* set initial position and size */
  531.       startx = newx = winFrame->core.x;
  532.       starty = newy = winFrame->core.y;
  533. --- 518,523 ----
  534. ***************
  535. *** 983,1071 ****
  536.       XFlush(dpy);
  537.       *timestamp = event.xbutton.time;
  538.       return True;
  539. - }
  540. - UserMoveVirtualWindow(dpy, first, cli)
  541. -     Display *dpy;
  542. -     XEvent *first;
  543. -     Client    *cli;
  544. - {
  545. -     static movestuff_t mstuff;
  546. -     List *winlist = NULL_LIST;
  547. -     unsigned int modmask;
  548. -     /*
  549. -      * Set up where the vdm is to check if we move into it during the move
  550. -      */
  551. -     {
  552. -     int    x,y;
  553. -     unsigned int    w, h, bw, d;
  554. -     Window    root;
  555. -     Client        *vdm_cli, *VirtualGetClient();
  556. -     if ((vdm_cli = VirtualGetClient(dpy, VDM)) != NULL &&
  557. -         vdm_cli->wmState != IconicState && vdm_cli != cli) {
  558. -         check_vdm = TRUE;
  559. -             XGetGeometry(dpy, VDMFrame, &root, &x, &y, &w, &h, &bw, &d);
  560. -         VDMLocX = x;
  561. -         VDMLocY = y;
  562. -         XGetGeometry(dpy, VDM, &root, &x, &y, &w, &h, &bw, &d);
  563. -         VDMLocX += x;
  564. -         VDMLocY += y;
  565. -     }
  566. -     else check_vdm = FALSE;
  567. -     }
  568. -     mstuff.dpy = dpy;
  569. -     mstuff.offX = 0;
  570. -     mstuff.offY = 0;
  571. -     mstuff.initX = first->xbutton.x_root;
  572. -     mstuff.initY = first->xbutton.y_root;
  573. -     InVDM = 1;
  574. -     StartInVDM = 1;
  575. -     if (first->xbutton.state & ShiftMask) {
  576. -     invertMoveWindow = True;
  577. -     GRV.DragWindow = !GRV.DragWindow;
  578. -     }
  579. -     /*
  580. -      * If a meta key is held down, slow down the dragging by a factor of ten.
  581. -      */
  582. -     modmask = FindModifierMask(XKeysymToKeycode(dpy,XK_Meta_L)) |
  583. -           FindModifierMask(XKeysymToKeycode(dpy,XK_Meta_R));
  584. -     if (first->xbutton.state & modmask) {
  585. -     mstuff.rounder = 5;
  586. -     mstuff.divider = 10;
  587. -     } else {
  588. -     mstuff.rounder = 0;
  589. -     mstuff.divider = 1;
  590. -     }
  591. -     if (cli->wmState == IconicState)
  592. -     winlist = ListCons(cli->iconwin, NULL);
  593. -     else
  594. -     winlist = ListCons(cli->framewin, NULL);
  595. -     mstuff.winlist = winlist;
  596. -     XGrabPointer(dpy, DefaultRootWindow(dpy), False, 
  597. -          (ButtonReleaseMask | PointerMotionMask),
  598. -          GrabModeAsync, GrabModeAsync,
  599. -          (GRV.AllowMoveIntoDesktop) ? None : VDM,
  600. -          GRV.MovePointer, CurrentTime);
  601. -                     /* REMIND - use first.xbutton.time? */
  602. -     InstallInterposer( movewinInterposer, &mstuff );
  603. -     /*
  604. -      * If we're dragging the outlines, we must also grab the server and draw 
  605. -      * the initial set of bounding boxes.
  606. -      */
  607. -     if (!GRV.DragWindow) {
  608. -     XGrabServer(dpy);
  609. -     (void) ListApply(mstuff.winlist, drawOneBox, &mstuff);
  610. -     }
  611.   }
  612. --- 972,975 ----
  613. Common subdirectories: build/SCCS and src/SCCS
  614. *** build/events.c    Sat Jun 22 20:09:06 1991
  615. --- src/events.c    Sat Jun 22 20:56:14 1991
  616. ***************
  617. *** 6,12 ****
  618.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  619.    */
  620.   
  621. ! static char     sccsid[] = "@(#)events.c    1.2 olvwm version 3/30/91";
  622.   
  623.   /*
  624.    * Based on
  625. --- 6,12 ----
  626.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  627.    */
  628.   
  629. ! static char     sccsid[] = "@(#)events.c    1.3 olvwm version 6/22/91";
  630.   
  631.   /*
  632.    * Based on
  633. ***************
  634. *** 141,147 ****
  635.   
  636.       if (winInfo == NULL)
  637.       {
  638. !         if (IsVirtual(event->xany.window))
  639.               VirtualEvents(dpy, event);
  640.           /* REMIND should we do anything with these events? */
  641.           else if (GRV.PrintOrphans)
  642. --- 141,147 ----
  643.   
  644.       if (winInfo == NULL)
  645.       {
  646. !         if (IsVirtual(dpy, event->xany.window))
  647.               VirtualEvents(dpy, event);
  648.           /* REMIND should we do anything with these events? */
  649.           else if (GRV.PrintOrphans)
  650. ***************
  651. *** 167,173 ****
  652.       {
  653.           (*evFunc)(dpy, event, winInfo);
  654.       }
  655. !     else if (IsVirtual(event->xany.window))
  656.           VirtualEvents(dpy, event);
  657.       else
  658.           if (GRV.PrintOrphans)
  659. --- 167,173 ----
  660.       {
  661.           (*evFunc)(dpy, event, winInfo);
  662.       }
  663. !     else if (IsVirtual(dpy, event->xany.window))
  664.           VirtualEvents(dpy, event);
  665.       else
  666.           if (GRV.PrintOrphans)
  667. *** build/globals.h    Sat Jun 22 20:08:41 1991
  668. --- src/globals.h    Sat Jun 22 20:56:14 1991
  669. ***************
  670. *** 6,12 ****
  671.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  672.    */
  673.   
  674. ! /* @(#)globals.h    1.4 olvwm version 4/17/91 */
  675.   
  676.   /* Based on @(#) globals.h 1.13 90/05/31 Crucible */
  677.   
  678. --- 6,12 ----
  679.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  680.    */
  681.   
  682. ! /* @(#)globals.h    1.5 olvwm version 6/22/91 */
  683.   
  684.   /* Based on @(#) globals.h 1.13 90/05/31 Crucible */
  685.   
  686. ***************
  687. *** 103,108 ****
  688. --- 103,113 ----
  689.       int        AutoRootMenuY;
  690.       Bool        VirtualIconic;
  691.       List        *StickyList;
  692. +     Bool        RelativePosition;
  693. +     Bool        GrabVirtualKeys;
  694. +     unsigned long    VirtualPixmapColor;
  695. +     int        VirtualGrid;
  696. +     unsigned long    VirtualGridColor;
  697.   } GlobalResourceVariables;
  698.   
  699.   extern GlobalResourceVariables    GRV;
  700. *** build/list.c    Sat Jun 22 20:08:43 1991
  701. --- src/list.c    Sat Jun 22 20:56:15 1991
  702. ***************
  703. *** 205,210 ****
  704. --- 205,234 ----
  705.       }
  706.   }
  707.   
  708. + List *
  709. + ListDestroyCellByValue(val, l)
  710. +     void    *val;
  711. +     List    *l;
  712. + {
  713. + List    *cell, *last;
  714. +     for (cell = l, last = NULL; cell; last = cell, cell = cell->next)
  715. +     if (cell->value == val)
  716. +         break;
  717. +     if (!cell)
  718. +     return l;
  719. +     if (last) {
  720. +     last->next = cell->next;
  721. +     freeCell(cell);
  722. +     }
  723. +     else {
  724. +     l = l->next;
  725. +     freeCell(cell);
  726. +     }
  727. +     return l;
  728. + }
  729. +     
  730.   /* global function 
  731.    * void ListApply(List *l,void *(*f)(),void*c)
  732.    *
  733. *** build/list.h    Sat Jun 22 20:08:43 1991
  734. --- src/list.h    Sat Jun 22 20:56:15 1991
  735. ***************
  736. *** 38,43 ****
  737. --- 38,48 ----
  738.        * reference to point to the next cell.
  739.        */
  740.   
  741. + extern List *ListDestroyCellByValue();    /* void *val, List *l */
  742. +     /* deletes the given cell from the list and passes back the
  743. +      * (possibly modified) new list
  744. +      */
  745.   extern void *ListApply();    /* List *l, (void *)(*f)(), void *c */
  746.       /* iteratively calls the function f with list values and the
  747.        * closure, until it returns a non-NULL value.  Returns this non-Null
  748. *** build/winnofoc.c    Sat Jun 22 20:08:59 1991
  749. --- src/winnofoc.c    Sat Jun 22 20:56:19 1991
  750. ***************
  751. *** 6,12 ****
  752.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  753.    */
  754.   
  755. ! static char     sccsid[] = "@(#)winnofoc.c    1.2 olvwm version 3/30/91";
  756.   
  757.   /*
  758.    * Based on
  759. --- 6,12 ----
  760.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  761.    */
  762.   
  763. ! static char     sccsid[] = "@(#)winnofoc.c    1.3 olvwm version 6/22/91";
  764.   
  765.   /*
  766.    * Based on
  767. ***************
  768. *** 60,65 ****
  769. --- 60,66 ----
  770.       XDestroyWindow(dpy, winInfo->core.self);
  771.       WIUninstallInfo(winInfo->core.self);
  772.       MemFree(winInfo);
  773. +     NoFocusWin = NULL;
  774.   }
  775.   
  776.   
  777. ***************
  778. *** 162,168 ****
  779.   Display *dpy;
  780.   Time evtime;
  781.   {
  782. !     XSetInputFocus(dpy, NoFocusWin, RevertToParent, evtime);
  783.   }
  784.   
  785.   /*
  786. --- 163,170 ----
  787.   Display *dpy;
  788.   Time evtime;
  789.   {
  790. !     if (NoFocusWin)
  791. !         XSetInputFocus(dpy, NoFocusWin, RevertToParent, evtime);
  792.   }
  793.   
  794.   /*
  795. *** build/winpane.c    Sat Jun 22 20:09:12 1991
  796. --- src/winpane.c    Sat Jun 22 20:56:19 1991
  797. ***************
  798. *** 6,12 ****
  799.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  800.    */
  801.   
  802. ! static char     sccsid[] = "@(#)winpane.c    1.2 olvwm version 3/30/91";
  803.   
  804.   /*
  805.    * Based on
  806. --- 6,12 ----
  807.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  808.    */
  809.   
  810. ! static char     sccsid[] = "@(#)winpane.c    1.3 olvwm version 6/22/91";
  811.   
  812.   /*
  813.    * Based on
  814. ***************
  815. *** 423,429 ****
  816.            * ColormapChangeMask -- to track colormaps accurately
  817.            * EnterWindowMask -- to install colormaps appropriately
  818.            */
  819. !     if (!IsVirtual(win)) {
  820.           mask = PropertyChangeMask | StructureNotifyMask |
  821.               ColormapChangeMask | EnterWindowMask;
  822.               XSelectInput(cli->dpy, win, mask);
  823. --- 423,429 ----
  824.            * ColormapChangeMask -- to track colormaps accurately
  825.            * EnterWindowMask -- to install colormaps appropriately
  826.            */
  827. !     if (!IsVirtual(cli->dpy, win)) {
  828.           mask = PropertyChangeMask | StructureNotifyMask |
  829.               ColormapChangeMask | EnterWindowMask;
  830.               XSelectInput(cli->dpy, win, mask);
  831. *** build/winroot.c    Sat Jun 22 20:09:16 1991
  832. --- src/winroot.c    Sat Jun 22 20:56:20 1991
  833. ***************
  834. *** 6,12 ****
  835.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  836.    */
  837.   
  838. ! static char     sccsid[] = "@(#)winroot.c    1.2 olvwm version 3/30/91";
  839.   
  840.   /*
  841.    * Based on
  842. --- 6,12 ----
  843.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  844.    */
  845.   
  846. ! static char     sccsid[] = "@(#)winroot.c    1.3 olvwm version 6/22/91";
  847.   
  848.   /*
  849.    * Based on
  850. ***************
  851. *** 124,137 ****
  852.       Client        *childClient;
  853.       Bool        samescreen;
  854.       int            destX, destY;
  855.   
  856. !     samescreen = XTranslateCoordinates(dpy,
  857. !     DefaultRootWindow(dpy), DefaultRootWindow(dpy),
  858. !     pEvent->xkey.x, pEvent->xkey.y, &destX, &destY, &child );
  859.   
  860.       if (!samescreen)
  861.       return;
  862.   
  863.       if (pEvent->type == KeyPress && child != None &&
  864.       matchKeystrokeToSpec(pEvent, &(GRV.FrontKey))) {
  865.       XWindowChanges xwc;
  866. --- 124,152 ----
  867.       Client        *childClient;
  868.       Bool        samescreen;
  869.       int            destX, destY;
  870. +     extern Window    VDMFrame;
  871. +     int            inVDM = False;
  872.   
  873. !     if (CheckVDMMove(dpy, pEvent))
  874. !     return;
  875.   
  876. +     do {
  877. +         samescreen = XTranslateCoordinates(dpy,
  878. +         DefaultRootWindow(dpy), DefaultRootWindow(dpy),
  879. +         pEvent->xkey.x, pEvent->xkey.y, &destX, &destY, &child );
  880. +     if (child == VDMFrame) {
  881. +         TranslateVirtualCoords(dpy, &pEvent->xkey.x, &pEvent->xkey.y,
  882. +             NULL, NULL);
  883. +         inVDM = True;
  884. +     }
  885. +     } while (child == VDMFrame);
  886.       if (!samescreen)
  887.       return;
  888.   
  889. +     if (inVDM && child == None)
  890. +     child = VDMFrame;
  891.       if (pEvent->type == KeyPress && child != None &&
  892.       matchKeystrokeToSpec(pEvent, &(GRV.FrontKey))) {
  893.       XWindowChanges xwc;
  894. ***************
  895. *** 138,146 ****
  896.       xwc.stack_mode = Opposite;
  897.       XConfigureWindow( dpy, child, CWStackMode, &xwc );
  898.       childInfo = WIGetInfo(child);
  899. !     childClient = childInfo->core.client;
  900. !     if (childClient && childClient->virtualWindow) {
  901. !         XConfigureWindow(dpy, childClient->virtualWindow, CWStackMode, &xwc);
  902.       }
  903.       } else if (matchKeystrokeToSpec(pEvent, &(GRV.HelpKey))) {
  904.       redistributeKeystroke( dpy, pEvent );
  905. --- 153,164 ----
  906.       xwc.stack_mode = Opposite;
  907.       XConfigureWindow( dpy, child, CWStackMode, &xwc );
  908.       childInfo = WIGetInfo(child);
  909. !     if (childInfo) {
  910. !         childClient = childInfo->core.client;
  911. !         if (childClient && childClient->virtualWindow) {
  912. !             XConfigureWindow(dpy,
  913. !                 childClient->virtualWindow, CWStackMode, &xwc);
  914. !         }
  915.       }
  916.       } else if (matchKeystrokeToSpec(pEvent, &(GRV.HelpKey))) {
  917.       redistributeKeystroke( dpy, pEvent );
  918. *** build/olwm.c    Sat Jul 27 21:35:49 1991
  919. --- src/olwm.c    Sat Jul 27 21:33:43 1991
  920. ***************
  921. *** 6,12 ****
  922.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  923.    */
  924.   
  925. ! static char     sccsid[] = "@(#)olwm.c    1.4 olvwm version 4/25/91";
  926.   
  927.   /*
  928.    * Based on
  929. --- 6,12 ----
  930.    *    Written for Sun Microsystems by Crucible, Santa Cruz, CA.
  931.    */
  932.   
  933. ! static char     sccsid[] = "@(#)olwm.c    1.5 olvwm version 7/27/91";
  934.   
  935.   /*
  936.    * Based on
  937. ***************
  938. *** 725,730 ****
  939. --- 725,735 ----
  940.           --DeadChildren;
  941.       }
  942.       (void) sigsetmask(oldmask);
  943. +     /*
  944. +      * Following is only needed for SYSV, but it doesn't hurt in BSD
  945. +      * either . . .
  946. +      */
  947. +     signal(SIGCHLD, HandleChildSignal);
  948.   }
  949.   
  950.   /*
  951.  
  952. --
  953. Dan Heller
  954. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  955. Senior Writer                President          comp-sources-x@uunet.uu.net
  956. argv@ora.com                 argv@zipcode.com
  957.