[sawfish/sawfish-2.90] updated hot-spots to 2.1.0
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish/sawfish-2.90] updated hot-spots to 2.1.0
- Date: Sun, 24 Oct 2010 19:28:26 +0000 (UTC)
commit c1295f171016d8d7d27a2ac57adc65e8d3100aed
Author: Christopher Roy Bratusek <zanghar freenet de>
Date: Sun Oct 24 21:27:33 2010 +0200
updated hot-spots to 2.1.0
lisp/sawfish/wm/edge/hot-spots.jl | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/lisp/sawfish/wm/edge/hot-spots.jl b/lisp/sawfish/wm/edge/hot-spots.jl
index fb42f07..069c6f6 100644
--- a/lisp/sawfish/wm/edge/hot-spots.jl
+++ b/lisp/sawfish/wm/edge/hot-spots.jl
@@ -1,4 +1,4 @@
-;; hot-spots.jl 2.0.0 -- perform actions when hitting the screen-edge
+;; hot-spots.jl 2.1.0 -- perform actions when hitting the screen-edge
;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar freenet de>
@@ -20,7 +20,7 @@
(define-structure sawfish.wm.edge.hot-spots
- (export )
+ (export hot-spots-activate)
(open rep
rep.system
@@ -58,11 +58,26 @@
(defvar bottom-left-corner-program nil
"The program launched when hitting the bottom-left-corner.")
+ (defcustom hot-spots-enable nil
+ "Whether to enable sensitive spots on the screen-edge."
+ :type boolean
+ :group (workspace hot-spot)
+ :after-set (lambda () hot-spots-activate))
+
(defcustom hot-spot-delay 150
"Milliseconds to delay before activating hot-spot."
:type number
:group (workspace hot-spot))
+ (define (hot-spots-activate)
+ (if hot-spots-enable
+ (unless (in-hook-p 'enter-flipper-hook hot-spots-hook)
+ (add-hook 'enter-flipper-hook hot-spots-hook)
+ (flippers-activate t))
+ (if (in-hook-p 'enter-flipper-hook hot-spots-hook)
+ (remove-hook 'enter-flipper-hook hot-spots-hook))
+ (flippers-activate nil)))
+
(define hs-timer nil)
(define (hot-spots-hook)
@@ -122,7 +137,6 @@
(if (functionp bottom-edge-program)
(funcall bottom-edge-program)
(system (concat bottom-edge-program " &")))))))
-
- ;; init
+
(unless batch-mode
- (add-hook 'enter-flipper-hook hot-spots-hook)))
+ (hot-spots-activate)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]