[sawfish: 12/42] make edge-actions deactivatible via sawfishrc load edge-actions in user.jl not wm.jl move all option
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish: 12/42] make edge-actions deactivatible via sawfishrc load edge-actions in user.jl not wm.jl move all option
- Date: Sat, 16 Apr 2011 05:27:35 +0000 (UTC)
commit bfac0f0d1507eb822a4e7661ed0cacb2895811e6
Author: Christopher Roy Bratusek <nano tuxfamily org>
Date: Sun Apr 10 09:33:16 2011 +0200
make edge-actions deactivatible via sawfishrc
load edge-actions in user.jl not wm.jl
move all options from actions.jl hot-spot.jl flip.jl util.jl and viewport-drag.jl to conf.jl
lisp/sawfish/wm.jl | 3 +--
lisp/sawfish/wm/edge/actions.jl | 29 +++++++----------------------
lisp/sawfish/wm/edge/flip.jl | 6 ------
lisp/sawfish/wm/edge/hot-spots.jl | 6 ------
lisp/sawfish/wm/edge/util.jl | 7 -------
lisp/sawfish/wm/edge/viewport-drag.jl | 13 -------------
lisp/sawfish/wm/user.jl | 11 ++++++++---
7 files changed, 16 insertions(+), 59 deletions(-)
---
diff --git a/lisp/sawfish/wm.jl b/lisp/sawfish/wm.jl
index f787206..9ae4106 100644
--- a/lisp/sawfish/wm.jl
+++ b/lisp/sawfish/wm.jl
@@ -114,8 +114,7 @@
sawfish.wm.state.iconify
sawfish.wm.state.shading
sawfish.wm.state.transient
- sawfish.wm.state.ignored
- sawfish.wm.edge.actions)))
+ sawfish.wm.state.ignored)))
(open-structures mods)
#| I.e.
(export-bindings (parse-interface
diff --git a/lisp/sawfish/wm/edge/actions.jl b/lisp/sawfish/wm/edge/actions.jl
index 2649054..2700086 100644
--- a/lisp/sawfish/wm/edge/actions.jl
+++ b/lisp/sawfish/wm/edge/actions.jl
@@ -20,13 +20,15 @@
(define-structure sawfish.wm.edge.actions
- (export activate-edges)
+ (export activate-edges
+ activate-edges-after-set)
(open rep
rep.system
sawfish.wm.misc
sawfish.wm.events
sawfish.wm.custom
+ sawfish.wm.edge.conf
sawfish.wm.edge.util
sawfish.wm.edge.flip
sawfish.wm.edge.hot-spots
@@ -34,26 +36,6 @@
(define-structure-alias edge-actions sawfish.wm.edge.actions)
- (defcustom left-right-edge-action 'none/hot-spot
- "Action for the left and right screen-edge."
- :group edge-actions
- :type (choice none/hot-spot viewport-drag flip-workspace flip-viewport))
-
- (defcustom left-right-edge-move-action 'none
- "Action for the left and right screen-edge while moving a window."
- :group edge-actions
- :type (choice none viewport-drag flip-workspace flip-viewport))
-
- (defcustom top-bottom-edge-action 'none/hot-spot
- "Action for the top and bottom screen-edge."
- :group edge-actions
- :type (choice none/hot-spot viewport-drag flip-workspace flip-viewport))
-
- (defcustom top-bottom-edge-move-action 'none
- "Action for the top and bottom screen-edge while moving a window."
- :group edge-actions
- :type (choice none viewport-drag flip-workspace flip-viewport))
-
(define (edge-action-call func edge)
(case func
((viewport-drag)
@@ -101,4 +83,7 @@
(add-hook 'while-moving-hook edge-action-move-hook-func)))
(activate-flippers nil)
(remove-hook 'enter-flipper-hook edge-action-hook-func)
- (remove-hook 'while-moving-hook edge-action-move-hook-func))))
+ (remove-hook 'while-moving-hook edge-action-move-hook-func)))
+
+ (define (activate-edges-after-set)
+ (activate-edges edge-actions-enabled)))
diff --git a/lisp/sawfish/wm/edge/flip.jl b/lisp/sawfish/wm/edge/flip.jl
index 678e1ea..40a2581 100644
--- a/lisp/sawfish/wm/edge/flip.jl
+++ b/lisp/sawfish/wm/edge/flip.jl
@@ -37,12 +37,6 @@
(define-structure-alias edge-flip sawfish.wm.edge.flip)
- (defcustom edge-flip-delay 250
- "Delay (in milliseconds) of flipping of viewport / workspace."
- :group edge-actions
- :type number
- :range (0 . nil))
-
(define (edge-flip-invoke edge type)
(make-timer (lambda ()
(flip-core edge type))
diff --git a/lisp/sawfish/wm/edge/hot-spots.jl b/lisp/sawfish/wm/edge/hot-spots.jl
index ba9a192..e88c7ac 100644
--- a/lisp/sawfish/wm/edge/hot-spots.jl
+++ b/lisp/sawfish/wm/edge/hot-spots.jl
@@ -33,12 +33,6 @@
(define-structure-alias hot-spots sawfish.wm.edge.hot-spots)
- (defcustom hot-spot-delay 250
- "Delay (in milliseconds) before activating a hot-spot."
- :group edge-actions
- :type number
- :range (0 . nil))
-
(defvar left-edge-function nil
"The function launched when hitting the left-edge.")
diff --git a/lisp/sawfish/wm/edge/util.jl b/lisp/sawfish/wm/edge/util.jl
index 111b8b4..4c96e07 100644
--- a/lisp/sawfish/wm/edge/util.jl
+++ b/lisp/sawfish/wm/edge/util.jl
@@ -45,13 +45,6 @@
(remove-hook 'after-restacking-hook raise-flippers)
(remove-hook 'randr-change-notify-hook recreate-flippers)))
- (defcustom hot-spots-corner-length 50
- "The size portion of the screen-border recognized as \"corners\",
-in pixels. Applies to both x and y direction."
- :type number
- :range (5 . 500)
- :group edge-actions)
-
(define (get-active-corner)
(let ((cursor-x (car (query-pointer)))
(cursor-y (cdr (query-pointer))))
diff --git a/lisp/sawfish/wm/edge/viewport-drag.jl b/lisp/sawfish/wm/edge/viewport-drag.jl
index 3b137c3..14a61e2 100644
--- a/lisp/sawfish/wm/edge/viewport-drag.jl
+++ b/lisp/sawfish/wm/edge/viewport-drag.jl
@@ -27,19 +27,6 @@
(define-structure-alias viewport-drag sawfish.wm.edge.viewport-drag)
- (defcustom viewport-drag-distance 64
- "Amount to drag the viewport (in pixel) each time the pointer hits the
-screen edge."
- :group edge-actions
- :type number
- :range (1 . nil))
-
- (defcustom viewport-drag-cursor-distance 32
- "Amount to pull back the cursor (in pixel) after dragging the viewport."
- :group edge-actions
- :type number
- :range (1 . nil))
-
(define (drag-right)
"Shifts the viewport `viewport-drag-distance' pixels to the right."
(let ((dist viewport-drag-distance)
diff --git a/lisp/sawfish/wm/user.jl b/lisp/sawfish/wm/user.jl
index 53b419a..c264ed4 100644
--- a/lisp/sawfish/wm/user.jl
+++ b/lisp/sawfish/wm/user.jl
@@ -47,6 +47,8 @@
sawfish.wm.util.compat
sawfish.wm.ext.error-handler
sawfish.wm.ext.apps-menu
+ sawfish.wm.edge.conf
+ sawfish.wm.edge.actions
sawfish.wm.frames
sawfish.wm.menus)
(access sawfish.wm.integration.kde
@@ -151,10 +153,13 @@ Possible values are \"kde\", \"gnome\", \"xfce\", or \"none\".")
(sawfish.wm.integration.kde#kde-late-init))
;; generate apps-menu from *.desktop files
- ;; initialize the screen-edges
(unless batch-mode
- (init-apps-menu)
- (activate-edges t))
+ (init-apps-menu))
+
+ ;; initialize edges, unless disabled
+ (if (and (not batch-mode)
+ edge-actions-enabled)
+ (activate-edges t))
;; apply customized font-colors
(if use-custom-font-color
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]