home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.freefriends.org
/
ftp.freefriends.org.tar
/
ftp.freefriends.org
/
arnold
/
Source
/
gwm-dist.tar.gz
/
gwm-dist.tar
/
home-gwm
/
jerq-behavior.gwm
< prev
next >
Wrap
Text File
|
1993-07-07
|
5KB
|
144 lines
; default behaviors
; ==================
(: move-grid-style 3)
(: resize-grid-style 3)
(de btn3menus nil
(if (= (bitwise-and (current-event-modifier)
(together with-alt with-shift)) with-alt)
(pop-menu alt-root-pop)
(pop-menu)))
(: standard-behavior
(state-make
(on (buttonpress 1 alone) (progn (raise-window)(move-window)))
(on (button 1 with-shift) (lower-window))
(on (buttonpress 1 with-alt) (progn (raise-window)(move-window)))
(on (button 1 (together with-shift with-alt)) (lower-window))
(on (buttonpress 3 any) (btn3menus))
))
(: window-behavior
(state-make
(on (buttonpress 1 alone) (currtop nil))
(on (buttonpress 1 with-alt) (currtop t))
(on (buttonpress 2 (together with-shift with-alt with-control))
(progn
(? "original wob: " wob "; window x, y:" window-x ", " window-y "\n")
(with (wob (wob-at-coords (current-event-x) (current-event-y)))
(? "new wob: " wob "; window x, y:" window-x ", " window-y "\n")
(? window-property "\n"))))
(on name-change (send-user-event 'name-change))
(on focus-in (progn (window-property (# 'has-focus window-property t))
(unset-grabs (button any any))
(eval (+ '(set-grabs) focus-window-grabs))
(send-user-event 'focus-in window)))
(on focus-out (progn (window-property (# 'has-focus window-property ()))
(unset-grabs (button any any))
(eval (+ '(set-grabs) window-grabs))
(send-user-event 'focus-out)))
(on window-icon-pixmap-change
(send-user-event 'icon-pixmap-change window-icon))))
(: root-behavior
(state-make
(on (buttonpress 3 any) (btn3menus))
(on (key (key-make "BackSpace") with-alt)
(execute-string (+ "(? " cut-buffer ")")))
(on (key (key-make "Delete") with-alt) (end))))
;; icon-specific actions
(: icon-behavior
(state-make
(on (buttonpress 2 any)
(icon-group-pop window))
))
(: focus-window-grabs
(list
(button any with-alt)
(button 3 (together with-shift with-alt))
(button any (together with-shift with-alt with-control)))) ; debugging
(: grabs
(: root-grabs
(: window-grabs
(: icon-grabs
(+ focus-window-grabs (list (button any any)))))))
(reparse-standard-behaviors)
(de currtop (force)
(if (not (= wob root-window))
(if (not (# 'has-focus window-property))
(progn
(raise-window)
(if (not (ct-set-focus))
(bell -50)))))) ; Warn that the turkey window didn't
; take the focus
(de ct-set-focus nil
(with (check-input-focus-flag
(if force
1
check-input-focus-flag))
(set-focus)))
(de current ()
(if (not (= wob root-window))
(if (not (# 'has-focus window-property))
(if (not (set-focus))
(bell -50))))) ; Warn that the turkey window didn't
; take the focus
(de all-window-info nil
(? "\nInfo for all windows:\n\n")
(for window (list-of-windows)
(? "window " window ": window-client-class: " window-client-class "\n")
(? " window-client-height, width, x, y: " window-client-height ", "
window-client-width ", " window-client-x ", " window-client-y "\n")
(? " window-client-name: " window-client-name ", window-icon: "
window-icon ", window-icon-name: " window-icon-name "\n")
(? " window-is-mapped: " window-is-mapped ", window-is-transient-for: "
window-is-transient-for ", window-machine-name: " window-machine-name
"\n")
(? " window-name: " window-name ", window-property: " window-property
", window-size: " window-size "\n")
(? " window-starts-iconic: " window-starts-iconic ", window-status: "
window-status "\n")
(? " window-was-on-screen: " window-was-on-screen
", window-height, width, x, y: " window-height ", " window-width
", " window-x ", " window-y "\n")
(? " window-window: " window-window
", window-user-set-position, size: " window-user-set-position ", "
window-user-set-size "\n")
(? " wob-property: " wob-property ", wob-status, height, width: "
wob-status ", " wob-height ", " wob-width "\n")))
(de window-info nil
(? "\nWindow info:\n\n")
(? "window " window ": window-client-class: " window-client-class "\n")
(? " window-client-height, width, x, y: " window-client-height ", "
window-client-width ", " window-client-x ", " window-client-y "\n")
(? " window-client-name: " window-client-name ", window-icon: "
window-icon ", window-icon-name: " window-icon-name "\n")
(? " window-is-mapped: " window-is-mapped ", window-is-transient-for: "
window-is-transient-for ", window-machine-name: " window-machine-name
"\n")
(? " window-name: " window-name ", window-property: " window-property
", window-size: " window-size "\n")
(? " window-starts-iconic: " window-starts-iconic ", window-status: "
window-status "\n")
(? " window-was-on-screen: " window-was-on-screen
", window-height, width, x, y: " window-height ", " window-width
", " window-x ", " window-y "\n")
(? " window-window: " window-window
", window-user-set-position, size: " window-user-set-position ", "
window-user-set-size "\n")
(? " wob-property: " wob-property ", wob-status, height, width: "
wob-status ", " wob-height ", " wob-width "\n"))