home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gwm18a.zip / data / unconf-move.gwm < prev    next >
Lisp/Scheme  |  1995-07-03  |  2KB  |  93 lines

  1. ;; package to be able to still move windows (partly) out of the screen, even
  2. ;; with confine-windows set to true
  3. ;; to use, just include (load 'unconf-move) in your .profile.gwm
  4. ;;
  5. ;; parameter to be set before load: unconf-move.modifier (defaults to control)
  6. ;;    will move unconfined on select button (with or without alternate)
  7. ;;    grabs button only with alternate
  8. ;;
  9. ;; rwhitby@adl.austek.oz.au (Rod Whitby)
  10. ;; Rod Whitby
  11. ;; Austek Microsystems Pty. Ltd.
  12. ;; Technology Park 
  13. ;; Adelaide, SA 5095 Australia
  14. ;; 
  15. ;; ACSnet:    rwhitby@austek.oz    ARPA:    rwhitby@austek.oz.au
  16. ;; UUCP:    uunet.uu.net!munnari!austek.oz.au!rwhitby
  17. ;; 
  18.  
  19. ; Add support for releasing confine-windows on moves and resizes
  20. ; by hitting control as well
  21.  
  22. (setq confine-windows t)
  23. (defaults-to unconf-move.modifier with-control)
  24.  
  25. (setq unconfined-move-behavior
  26.       (state-make
  27.        (on (buttonpress select-button unconf-move.modifier)
  28.        (if (deltabutton) (progn
  29.                    (raise-window)
  30.                    (with
  31.                 (confine-windows ())
  32.                  (move-window)))
  33.          (raise-window)))
  34.        (on (buttonpress select-button (together with-alt unconf-move.modifier))
  35.        (if (deltabutton) (progn
  36.                    (raise-window)
  37.                    (with
  38.                 (confine-windows ())
  39.                 (move-window)))
  40.          (raise-window)))
  41.        ))
  42.  
  43. (setq unconfined-resize-behavior
  44.       (state-make
  45.        (on (buttonpress action-button unconf-move.modifier)
  46.        (progn (raise-window)
  47.           (with (confine-wondows ())
  48.             (resize-window))))
  49.        (on (buttonpress action-button (together with-alt unconf-move.modifier))
  50.        (progn (raise-window)
  51.           (with (confine-windows ())
  52.             (resize-window))))
  53.        ))       
  54.  
  55. (setq unconfined-grabs
  56.       (list
  57.        (button select-button (together with-alt unconf-move.modifier))
  58.        (button action-button (together with-alt unconf-move.modifier))
  59.        ))
  60.  
  61. (: standard-title-behavior
  62.    (state-make
  63.     unconfined-move-behavior
  64.     unconfined-resize-behavior
  65.     standard-title-behavior
  66.     standard-behavior
  67.     ))
  68.  
  69. (setq window-behavior
  70.       (state-make
  71.        unconfined-move-behavior
  72.        unconfined-resize-behavior
  73.        window-behavior
  74.        ))
  75.  
  76. (setq icon-behavior
  77.       (state-make
  78.        unconfined-move-behavior
  79.        icon-behavior
  80.        ))
  81.  
  82. (reparse-standard-behaviors)
  83.  
  84. (: grabs
  85.    (: root-grabs
  86.       (: window-grabs
  87.      (: icon-grabs
  88.         (+ 
  89.          unconfined-grabs
  90.          grabs
  91.          )))))
  92.  
  93.