• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Japanese translation of message catalog for Sawfish Window-Manager


Commit MetaInfo

Revisão5c256d28aa6a1db014cfd0c828ea2eda9ee2c5a6 (tree)
Hora2014-08-20 03:57:00
AutorChristopher Roy Bratusek <nano@jpbe...>
CommiterChristopher Roy Bratusek

Mensagem de Log

enable shade-hover and auto-raise in SawfishConfig, utilize them in tabbing

Mudança Sumário

Diff

--- a/lisp/sawfish/wm/autoload.jl
+++ b/lisp/sawfish/wm/autoload.jl
@@ -128,6 +128,8 @@
128128 (autoload-command 'slide-group-down 'sawfish.wm.commands.slide-window)
129129 (defgroup gpsy "Grow, Pack, Shrink & Yank" :group move :require sawfish.wm.commands.grow-pack)
130130 (defgroup cycle "Window Cycling" :group focus :require sawfish.wm.commands.x-cycle)
131+(defgroup shade-hover "Shade Hover" :group focus :require sawfish.wm.ext.shade-hover)
132+(defgroup auto-raise "Auto-Raise" :group focus :require sawfish.wm.ext.auto-raise)
131133 (autoload-command 'cycle-windows 'sawfish.wm.commands.x-cycle)
132134 (autoload-command 'cycle-windows-backwards 'sawfish.wm.commands.x-cycle)
133135 (autoload-command 'cycle-group 'sawfish.wm.commands.x-cycle)
--- a/lisp/sawfish/wm/ext/auto-raise.jl
+++ b/lisp/sawfish/wm/ext/auto-raise.jl
@@ -34,7 +34,7 @@
3434
3535 (defgroup auto-raise "Auto-Raise" :group focus)
3636
37- (defcustom raise-windows-on-focus nil
37+ (defcustom raise-windows-on-focus t
3838 "Raise windows when they are focused."
3939 :type boolean
4040 :require sawfish.wm.ext.auto-raise
--- a/lisp/sawfish/wm/ext/shade-hover.jl
+++ b/lisp/sawfish/wm/ext/shade-hover.jl
@@ -20,7 +20,7 @@
2020
2121 (define-structure sawfish.wm.ext.shade-hover
2222
23- (export )
23+ (export clean-up)
2424
2525 (open rep
2626 rep.system
--- a/lisp/sawfish/wm/tabs/tabgroup.jl
+++ b/lisp/sawfish/wm/tabs/tabgroup.jl
@@ -38,6 +38,7 @@
3838
3939 (open rep
4040 rep.system
41+ rep.io.timers
4142 rep.data.records
4243 sawfish.wm.gaol
4344 sawfish.wm.misc
@@ -51,6 +52,8 @@
5152 sawfish.wm.stacking
5253 sawfish.wm.util.groups
5354 sawfish.wm.commands.groups
55+ sawfish.wm.ext.auto-raise
56+ sawfish.wm.ext.shade-hover
5457 sawfish.wm.workspace)
5558
5659 (define-structure-alias tabgroup sawfish.wm.tabs.tabgroup)
@@ -317,6 +320,7 @@ sticky, unsticky, fixed-position."
317320 ;; adopt window settings for the new tab
318321 (group-frame-style (window-get win 'frame-style))
319322 (group-frame-type (window-get win 'type))
323+ (group-frame-shade-hover (window-get win 'shade-hover))
320324 (group-frame-focus-mode (window-get win 'focus-mode))
321325 (group-frame-gravity (window-get win 'gravity))
322326 (group-frame-never-iconify (window-get win 'never-iconify))
@@ -349,6 +353,7 @@ sticky, unsticky, fixed-position."
349353 (if (window-get w 'shaded) (unshade-window w))
350354 (window-put w 'frame-style group-frame-style)
351355 (window-put w 'type group-frame-type)
356+ (window-put w 'shade-hover group-frame-shade-hover)
352357 (window-put w 'focus-mode group-frame-focus-mode)
353358 (window-put w 'gravity group-frame-gravity)
354359 (window-put w 'title-position group-frame-title-position)
@@ -559,7 +564,8 @@ sticky, unsticky, fixed-position."
559564 (setq tab-refresh-lock t)
560565 (when (window-tabbed-p win)
561566 (tab-refresh-group win 'move)
562- (tab-refresh-group win 'frame))
567+ (tab-refresh-group win 'frame)
568+ (set-input-focus (nth 0 (tab-group-windows-stacking-order win))))
563569 (setq tab-move-resize-lock nil)))
564570
565571 (define (unmap-id win)
@@ -586,6 +592,37 @@ of the windows the same 'tab-group property"
586592 (when (window-get win 'tab-group)
587593 (setq in-tab-group-name (remove (assoc last-unmap-id in-tab-group-name) in-tab-group-name))))
588594
595+ (define timer-raise nil)
596+ (define (focus-in-tab win)
597+ (if (or shade-hover-mode (window-get win 'shade-hover))
598+ (let ((timer-wait (if raise-windows-on-focus raise-window-timeout '500)))
599+ (if (or (eq focus-mode 'click)
600+ (window-get win 'focus-mode 'click))
601+ (setq timer-wait '1))
602+ (setq timer-raise
603+ (make-timer (lambda ()
604+ (raise-windows win (tab-group-windows-stacking-order win)))
605+ (quotient timer-wait 1000) (mod timer-wait 1000))))
606+ (tab-refresh-group win 'raise)))
607+
608+ (define (focus-out-tab)
609+ (when timer-raise
610+ (delete-timer timer-raise)
611+ (setq timer-raise nil)))
612+
613+ (define (unshade-tab win)
614+ (let ((unshade-nil))
615+ (when (window-get win 'shade-hover-unshaded)
616+ (mapcar (lambda (w)
617+ (if (not (window-get w 'shaded)) (setq unshade-nil 't))) (remove win (tab-group-windows win)))
618+ (when unshade-nil
619+ (window-put win 'shade-hover-unshaded nil)
620+ (clean-up)
621+ (setq unshade-nil nil)
622+ (mapcar (lambda (w)
623+ (shade-window w)) (remove win (tab-group-windows win))))
624+ (set-input-focus win))))
625+
589626 (unless batch-mode
590627 (add-hook 'after-add-window-hook in-tab-group)
591628 (add-hook 'unmap-notify-hook unmap-id)
@@ -616,7 +653,9 @@ of the windows the same 'tab-group property"
616653 (when (eq resize-outline-mode 'opaque)
617654 (add-hook 'before-resize-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win)))))
618655 (add-hook 'after-resize-hook (lambda (win) (after-move-resize win)))
619- (add-hook 'focus-in-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'raise))))
656+ (add-hook 'focus-in-hook (lambda (win) (if (window-tabbed-p win) (focus-in-tab win))))
657+ (add-hook 'focus-out-hook (lambda (win) (if (window-tabbed-p win) (focus-out-tab))))
658+ (add-hook 'unshade-window-hook (lambda (win) (if (window-tabbed-p win) (unshade-tab win))))
620659 (add-hook 'iconify-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'iconify))))
621660 (add-hook 'uniconify-window-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'uniconify))))
622661 (add-hook 'window-maximized-hook (lambda (win) (if (window-tabbed-p win) (tab-refresh-group win 'maximized))))