sawfish r4306 - in trunk: . lisp/sawfish/wm
- From: chrisb svn gnome org
- To: svn-commits-list gnome org
- Subject: sawfish r4306 - in trunk: . lisp/sawfish/wm
- Date: Thu, 20 Nov 2008 20:47:59 +0000 (UTC)
Author: chrisb
Date: Thu Nov 20 20:47:58 2008
New Revision: 4306
URL: http://svn.gnome.org/viewvc/sawfish?rev=4306&view=rev
Log:
added viewport boundary
Modified:
trunk/ChangeLog
trunk/lisp/sawfish/wm/viewport.jl
Modified: trunk/lisp/sawfish/wm/viewport.jl
==============================================================================
--- trunk/lisp/sawfish/wm/viewport.jl (original)
+++ trunk/lisp/sawfish/wm/viewport.jl Thu Nov 20 20:47:58 2008
@@ -62,6 +62,11 @@
:type number
:range (1 . 50))
+ (defcustom viewport-boundary-mode 'stop
+ "Wether to stop or wrap-around on first/last viewport"
+ :group workspace
+ :type (choice wrap-around stop))
+
;;; raw viewport handling
(defvar viewport-x-offset 0)
@@ -122,10 +127,13 @@
;; returns t if it actually moved the viewport
(define (set-screen-viewport col row)
+ (when (eq viewport-boundary-mode 'wrap-around)
+ (setq col (mod col (car viewport-dimensions))
+ row (mod row (cdr viewport-dimensions))))
(when (and (>= col 0) (< col (car viewport-dimensions))
- (>= row 0) (< row (cdr viewport-dimensions)))
+ (>= row 0) (< row (cdr viewport-dimensions)))
(set-viewport (* col (screen-width))
- (* row (screen-height)))
+ (* row (screen-height)))
t))
(define (select-workspace-and-viewport space col row)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]