• 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ão076ab71b55d46479f796ff62de9b8c17aaf92e46 (tree)
Hora2000-05-11 02:59:44
Autorjohn <john>
Commiterjohn

Mensagem de Log

(maximize-do-horizontal, maximize-do-vertical): use
current-head-dimensions and current-head-offset of the maximized window
to give the maximization bounds

(maximize-find-max-rectangle): new optional arg HEAD, the head to
constrain the rectangle to. Also, the output rectangle may only span a
single head

(maximize-do-both): constrain the maximized window to its current head

Mudança Sumário

Diff

--- a/lisp/maximize.jl
+++ b/lisp/maximize.jl
@@ -148,7 +148,8 @@
148148 (let
149149 ((x-span (maximize-expand-edges (cdr coords) (+ (cdr coords)
150150 (cdr fdims))
151- 0 (screen-width)
151+ (car (current-head-offset w))
152+ (car (current-head-dimensions w))
152153 (car coords) (+ (car coords)
153154 (car fdims))
154155 (car edges))))
@@ -161,7 +162,8 @@
161162 (let
162163 ((y-span (maximize-expand-edges (car coords) (+ (car coords)
163164 (car fdims))
164- 0 (screen-height)
165+ (cdr (current-head-offset w))
166+ (cdr (current-head-dimensions w))
165167 (cdr coords) (+ (cdr coords)
166168 (cdr fdims))
167169 (cdr edges))))
@@ -173,7 +175,7 @@
173175
174176 ;; 2D packing
175177
176-(defun maximize-find-max-rectangle (avoided edges)
178+(defun maximize-find-max-rectangle (avoided edges &optional head)
177179 (let*
178180 ((grid (grid-from-edges (car edges) (cdr edges)))
179181 rects)
@@ -181,12 +183,16 @@
181183 (sort (car grid)) (sort (cdr grid))
182184 (lambda (rect)
183185 ;; the rectangle mustn't overlap any avoided windows
186+ ;; or span multiple heads, or be on a different head
187+ ;; to that requested
184188 (catch 'foo
185189 (mapc (lambda (w)
186- (when (> (rect-2d-overlap
187- (window-frame-dimensions w)
188- (window-position w)
189- rect) 0)
190+ (when (or (> (rect-2d-overlap
191+ (window-frame-dimensions w)
192+ (window-position w)
193+ rect) 0)
194+ (/= (rectangle-heads rect) 1)
195+ (and head (/= head (find-head (car rect) (cadr rect)))))
190196 (throw 'foo nil)))
191197 avoided)
192198 t))))
@@ -204,7 +210,8 @@
204210
205211 (defun maximize-do-both (window avoided edges coords dims fdims)
206212 (let
207- ((max-rect (maximize-find-max-rectangle avoided edges)))
213+ ((max-rect (maximize-find-max-rectangle avoided edges
214+ (current-head window))))
208215 (when max-rect
209216 (rplaca coords (nth 0 max-rect))
210217 (rplacd coords (nth 1 max-rect))
@@ -268,7 +275,7 @@ doesn't overlap any avoided windows, or nil."
268275 (edges (get-visible-window-edges ':with-ignored-windows t
269276 ':windows avoided
270277 ':include-root t)))
271- (maximize-find-max-rectangle avoided edges)))
278+ (maximize-find-max-rectangle avoided edges (current-head w))))
272279
273280
274281 ;; commands
--- a/lisp/sawfish/wm/state/maximize.jl
+++ b/lisp/sawfish/wm/state/maximize.jl
@@ -148,7 +148,8 @@
148148 (let
149149 ((x-span (maximize-expand-edges (cdr coords) (+ (cdr coords)
150150 (cdr fdims))
151- 0 (screen-width)
151+ (car (current-head-offset w))
152+ (car (current-head-dimensions w))
152153 (car coords) (+ (car coords)
153154 (car fdims))
154155 (car edges))))
@@ -161,7 +162,8 @@
161162 (let
162163 ((y-span (maximize-expand-edges (car coords) (+ (car coords)
163164 (car fdims))
164- 0 (screen-height)
165+ (cdr (current-head-offset w))
166+ (cdr (current-head-dimensions w))
165167 (cdr coords) (+ (cdr coords)
166168 (cdr fdims))
167169 (cdr edges))))
@@ -173,7 +175,7 @@
173175
174176 ;; 2D packing
175177
176-(defun maximize-find-max-rectangle (avoided edges)
178+(defun maximize-find-max-rectangle (avoided edges &optional head)
177179 (let*
178180 ((grid (grid-from-edges (car edges) (cdr edges)))
179181 rects)
@@ -181,12 +183,16 @@
181183 (sort (car grid)) (sort (cdr grid))
182184 (lambda (rect)
183185 ;; the rectangle mustn't overlap any avoided windows
186+ ;; or span multiple heads, or be on a different head
187+ ;; to that requested
184188 (catch 'foo
185189 (mapc (lambda (w)
186- (when (> (rect-2d-overlap
187- (window-frame-dimensions w)
188- (window-position w)
189- rect) 0)
190+ (when (or (> (rect-2d-overlap
191+ (window-frame-dimensions w)
192+ (window-position w)
193+ rect) 0)
194+ (/= (rectangle-heads rect) 1)
195+ (and head (/= head (find-head (car rect) (cadr rect)))))
190196 (throw 'foo nil)))
191197 avoided)
192198 t))))
@@ -204,7 +210,8 @@
204210
205211 (defun maximize-do-both (window avoided edges coords dims fdims)
206212 (let
207- ((max-rect (maximize-find-max-rectangle avoided edges)))
213+ ((max-rect (maximize-find-max-rectangle avoided edges
214+ (current-head window))))
208215 (when max-rect
209216 (rplaca coords (nth 0 max-rect))
210217 (rplacd coords (nth 1 max-rect))
@@ -268,7 +275,7 @@ doesn't overlap any avoided windows, or nil."
268275 (edges (get-visible-window-edges ':with-ignored-windows t
269276 ':windows avoided
270277 ':include-root t)))
271- (maximize-find-max-rectangle avoided edges)))
278+ (maximize-find-max-rectangle avoided edges (current-head w))))
272279
273280
274281 ;; commands