~ubuntu-branches/ubuntu/jaunty/sawfish/jaunty

« back to all changes in this revision

Viewing changes to lisp/sawfish/wm/windows.jl

  • Committer: Bazaar Package Importer
  • Author(s): Luis Rodrigo Gallardo Cruz
  • Date: 2008-02-18 16:27:26 UTC
  • mfrom: (1.2.7 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080218162726-3a5v48p33qaki37z
Tags: 1:1.3.3-1
* New Upstream Release.
 - Fixes encoding issues introduced by the use of UTF-8 in
  1.3.2. (Closes: #464139).
 - Fixes pango fonts handling, to allow more than one to be used at a
  time (Closes: #269905).
 - Fixes interaction with KDE systray.
* Loosen overly tight build-dependency on gettext, and tighten the one
  on quilt (We use the makefile snippet from 0.40-1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
             (nreverse out))))))
202
202
 
203
203
  (define (window-supports-wm-protocol-p w atom)
204
 
    "Return true if winow W includes ATOM in its `WM_PROTOCOLS' property."
 
204
    "Return true if window W includes ATOM in its `WM_PROTOCOLS' property."
205
205
    (let* ((prop (get-x-property w 'WM_PROTOCOLS))
206
206
           (data (and prop (eq (car prop) 'ATOM) (nth 2 prop))))
207
207
      (when data
437
437
  (define (call-after-property-changed prop fun)
438
438
    "Arrange for function FUN to be called with arguments (WINDOW PROPERTY
439
439
STATE) when the X11 property named PROP (a symbol) changes. PROP may also
440
 
be a list of property names to monitor."
441
 
    (setq prop-changes (cons (cons (if (listp prop)
442
 
                                       prop
443
 
                                     (list prop)) fun) prop-changes)))
 
440
be a list of property names to monitor.
 
441
 
 
442
Kluge: if PROP is `WM_NAME', it is replaced with `(WM_NAME _NET_WM_NAME)'.
 
443
This is done to cope with themes that want to update title bars on name
 
444
changes but only watch `WM_NAME'.  A warning is printed on stderr when
 
445
this substitution occurs.  Those themes should really be fixed."
 
446
    (setq prop-changes
 
447
          (cons
 
448
           (cons (cond ((listp prop) prop)
 
449
                       ((eq prop 'WM_NAME)
 
450
                        (format standard-error
 
451
"(call-after-property-changed 'WM_NAME ...) should probably be
 
452
(call-after-property-changed '(WM_NAME _NET_WM_NAME) ...);
 
453
use '(WM_NAME) if you really want only WM_NAME\n")
 
454
                        '(WM_NAME _NET_WM_NAME))
 
455
                       (t (list prop)))
 
456
                 fun)
 
457
           prop-changes)))
444
458
  
445
459
  (add-hook 'property-notify-hook
446
460
            (lambda (w prop state)