~ubuntu-branches/ubuntu/lucid/sawfish/lucid-updates

« back to all changes in this revision

Viewing changes to lisp/sawfish/wm/state/gnome.jl

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2005-02-23 16:16:46 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050223161646-4id6qyw4h9lkvb0v
Tags: 1:1.3+cvs20050222-1
* New cvs release.
* Add an emacs initialisation script to load sawfish.el (Closes: #295290)
* Updated sawfish.el to 1.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;; gnome.jl -- minimal GNOME compliance
2
 
;; $Id: gnome.jl,v 1.74 2001/12/11 23:05:50 federico Exp $
 
2
;; $Id: gnome.jl,v 1.77 2003/02/20 04:56:05 jsh Exp $
3
3
 
4
4
;; Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
5
5
 
208
208
                     0))))
209
209
      (mapc (lambda (state)
210
210
              (case state
211
 
                ((window-list-skip)
212
 
                 (setq hints (logior (logand
213
 
                                      hints (lognot WIN_HINTS_SKIP_WINLIST))
214
 
                                     (if (window-get w 'window-list-skip)
215
 
                                         WIN_HINTS_SKIP_WINLIST 0)
216
 
                                     (if (window-get w 'avoid)
217
 
                                         WIN_HINTS_DO_NOT_COVER 0))))))
 
211
                ((window-list-skip task-list-skip)
 
212
                 (setq hints (logior
 
213
                              (logand
 
214
                               hints (lognot (logior WIN_HINTS_SKIP_WINLIST
 
215
                                                     WIN_HINTS_SKIP_TASKLIST)))
 
216
                              (if (window-get w 'window-list-skip)
 
217
                                  WIN_HINTS_SKIP_WINLIST 0)
 
218
                              (if (window-get w 'task-list-skip)
 
219
                                  WIN_HINTS_SKIP_TASKLIST 0)
 
220
                              (if (window-get w 'avoid)
 
221
                                  WIN_HINTS_DO_NOT_COVER 0))))))
218
222
            states)
219
223
      (set-x-property w '_WIN_HINTS (vector hints) 'CARDINAL 32)))
220
224
 
224
228
      (when (and class (>= (length class) 2))
225
229
        (cond ((and (string= (aref class 1) "Panel")
226
230
                    (string= (aref class 0) "panel_window"))
227
 
               ;; XXX I don't think the GNOME hints specify these things...
228
 
               (window-put w 'focus-click-through t)
229
 
               (window-put w 'no-history t)
230
 
               (window-put w 'never-iconify t)
231
 
               (window-put w 'never-maximize t)
232
 
               ;; XXX the panel is broken, in that it doesn't check
233
 
               ;; XXX that the wm gave it the position that it wanted.
234
 
               ;; XXX (The wm is under no obligation; the panel should
235
 
               ;; XXX move itself to the required position after
236
 
               ;; XXX initially mapping the window, or perhaps it
237
 
               ;; XXX should use the USPosition hints?). The following
238
 
               ;; XXX line prevents panel windows being placed at all
239
 
               (window-put w 'placed t))
 
231
               (mark-window-as-dock w))
240
232
              ((string= (aref class 1) "gmc-desktop-icon")
241
233
               (window-put w 'focus-click-through t)
242
234
               (window-put w 'never-focus t)
276
268
          (window-put w 'cycle-skip t))
277
269
        (unless (zerop (logand bits WIN_HINTS_SKIP_WINLIST))
278
270
          (window-put w 'window-list-skip t))
 
271
        (unless (zerop (logand bits WIN_HINTS_SKIP_TASKLIST))
 
272
          (window-put w 'task-list-skip t))
279
273
        (unless (zerop (logand bits WIN_HINTS_DO_NOT_COVER))
280
274
          (window-put w 'avoid t)))
281
275
      (when layer
326
320
             (unless (zerop (logand mask WIN_HINTS_SKIP_WINLIST))
327
321
               (window-put w 'window-list-skip
328
322
                           (not (zerop (logand bits WIN_HINTS_SKIP_WINLIST)))))
 
323
             (unless (zerop (logand mask WIN_HINTS_SKIP_TASKLIST))
 
324
               (window-put w 'task-list-skip
 
325
                           (not (zerop (logand bits WIN_HINTS_SKIP_TASKLIST)))))
329
326
             (unless (zerop (logand mask WIN_HINTS_DO_NOT_COVER))
330
327
               (window-put w 'avoid
331
328
                           (not (zerop (logand bits WIN_HINTS_DO_NOT_COVER)))))))
432
429
    (add-hook 'add-window-hook gnome-set-client-state)
433
430
    (call-after-state-changed '(sticky shaded maximized ignored stacking)
434
431
                              gnome-set-client-state)
435
 
    (call-after-state-changed '(window-list-skip) gnome-set-client-hints)
 
432
    (call-after-state-changed '(window-list-skip task-list-skip)
 
433
                              gnome-set-client-hints)
436
434
 
437
435
    (add-hook 'client-message-hook gnome-client-message-handler)
438
436
    (add-hook 'property-notify-hook gnome-property-handler)
450
448
 
451
449
  (unless (or gnome-window-id batch-mode)
452
450
    (gnome-init)
453
 
    (require 'sawfish.wm.gnome.match-window))
454
 
 
455
 
  (add-window-menu-toggle (_ "In GNOME _task list")
456
 
                          'gnome-toggle-skip-tasklist
457
 
                          (lambda (w) (not (gnome-hint-set-p w WIN_HINTS_SKIP_TASKLIST)))))
 
451
    (require 'sawfish.wm.gnome.match-window)))