🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2132

Re: disabling auto placement

#2132
From: Colas Nahaboo
Date: Tue, 09 Apr 1991 14:45
72 lines
3395 bytes
In article <9104082359.AA01595@hwcae.cfsat.honeywell.com> you write:
> The first is that I want GWM to place my Epoch windows for me. Be it
> intreactivly, through a hard coded default, or via a strange lisp
> function. I can't seem to dissuade Epoch from placing the window from
> the geometry specification. Anybody got any ideas?

what I use in my .profile.gwm is included at the end of this message
(warning: it will work with my "fixed" font I use in epoch and my screen size)
It may have little glitches, but you will get the idea.

> The other is the size of the window when I start Epoch. My geometry
> specification is:
> 	Emacs*screen.geometry:	100x58+1+221
> 
> Places the window in the "correct" place, but the size is too small.
> It starts out being 96x56, and I can't figure out why.

This is a GWM bug. GWM cannot reliably interpret size hints with old-style
(X11R3) hints. (technically, BaseHints should be used, not MinSize). So, in this
case it makes assumptions so as it works with XTerms, and the bad news is that
it doesn't work with epoch (there is a 4x2 offset between the two measures). The
solution is that epoch should use X11R4 hints... At least the difference is
fixed, and can be corrected for in scripts. In my code for instance, I use 76 86
for 80 88.

;;=============================================================================
;;                    epoch placement
;;=============================================================================

;; this is a code to arrange my epoch window: make new epoch windows occupy
;; vacant slots in the "Epoch-windows-list"
;; Sample list is one to the left, and a cascade to the right

(setq Epoch-windows-list '(
    ;; free (width height x-pixel-pos y-pixel-pos ordering-number)    
    free (76 86 0 0 0)
    free (76 86 570 0 1)
    free (76 84 590 20 2)
    free (76 82 610 40 3)
    free (76 80 630 60 4)
    free (76 78 650 80 5)
    free (76 76 670 100 6)
    free (76 74 690 120 7)
))

(set-placement Emacs.epoch 
  (lambda (flag)
    (if flag				; opening: seek free slot
      (if (not window-starts-iconic)	; then put window-id instead of free
	(place-epoch-window)
      )
					; closing: put 'free in slot
      (with (e (member window Epoch-windows-list))
	(if e
	  (## e Epoch-windows-list 'free)
)))))

;; search Epoch-windows-list for free slots, and move & resize window there
(defun place-epoch-window ()
  (with (geometry (# 'free Epoch-windows-list))
    (if geometry
      (progn
	(move-window (# 2 geometry) (# 3 geometry))
	(setq window-size (sublist 0 2 geometry))
	(## (* 2 (# 4 geometry)) Epoch-windows-list window)
))))



-- 
Colas Nahaboo, colas@sa.inria.fr, Bull Research, Koala Project, GWM X11 WM
Phone:(33) 93.65.77.70(.66 Fax), INRIA, B.P.109 - 06561 Valbonne Cedex, FRANCE.
Technical Details
Message-ID: <9104091340.AA08464@avahi.inria.fr>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,2c6c4ff5f120f5e9
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-04-09 09:51:08 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage
From: colas@AVAHI.INRIA.FR (Colas Nahaboo)
Newsgroups: gnu.epoch.misc
Subject: Re: disabling auto placement
Message-ID: <9104091340.AA08464@avahi.inria.fr>
Date: 9 Apr 91 14:45:55 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 72