- changed init-client and initial-client-rect, so that only windows
that don't want decorations are placed outside the manager (little hack for full-screen-mode)
This commit is contained in:
parent
76a07d54c6
commit
ace0a03116
|
@ -73,7 +73,6 @@
|
||||||
(changes (third msg))
|
(changes (third msg))
|
||||||
(client? (client-of-window wm window)))
|
(client? (client-of-window wm window)))
|
||||||
(if (window-exists? dpy window) (begin
|
(if (window-exists? dpy window) (begin
|
||||||
(mdisplay "move-wm: root-configure: " client? window changes "\n")
|
|
||||||
(let* ((r (window-rectangle dpy window))
|
(let* ((r (window-rectangle dpy window))
|
||||||
(dx (cond
|
(dx (cond
|
||||||
((assq (window-change x) changes) =>
|
((assq (window-change x) changes) =>
|
||||||
|
@ -128,13 +127,6 @@
|
||||||
(if client?
|
(if client?
|
||||||
(let* ((cw (client:client-window client?))
|
(let* ((cw (client:client-window client?))
|
||||||
(cr (window-rectangle dpy cw)))
|
(cr (window-rectangle dpy cw)))
|
||||||
(mdisplay "configuring client-window: " cw
|
|
||||||
(append (make-window-change-alist
|
|
||||||
(border-width 0)
|
|
||||||
(x (+ (rectangle:x cr) dx))
|
|
||||||
(y (+ (rectangle:y cr) dy)))
|
|
||||||
changes) "\n")
|
|
||||||
|
|
||||||
(configure-window
|
(configure-window
|
||||||
dpy cw
|
dpy cw
|
||||||
(append (make-window-change-alist
|
(append (make-window-change-alist
|
||||||
|
@ -226,6 +218,15 @@
|
||||||
(define (set-client-data:icon! client icon)
|
(define (set-client-data:icon! client icon)
|
||||||
(set-car! (cddr (client:data client)) icon))
|
(set-car! (cddr (client:data client)) icon))
|
||||||
|
|
||||||
|
(define (window-wants-decoration? dpy window)
|
||||||
|
(cond
|
||||||
|
((get-motif-wm-hints dpy window) =>
|
||||||
|
(lambda (hints)
|
||||||
|
(mdisplay (motif-wm-hints:decorations hints) "\n")
|
||||||
|
(or (not (motif-wm-hints:decorations hints))
|
||||||
|
(not (null? (enum-set->list (motif-wm-hints:decorations hints)))))))
|
||||||
|
(else #t)))
|
||||||
|
|
||||||
(define (init-client wm client maybe-rect)
|
(define (init-client wm client maybe-rect)
|
||||||
(let ((dpy (wm:dpy wm)))
|
(let ((dpy (wm:dpy wm)))
|
||||||
(let* ((r (initial-client-rect wm client maybe-rect))
|
(let* ((r (initial-client-rect wm client maybe-rect))
|
||||||
|
@ -235,11 +236,14 @@
|
||||||
(options (wm:options wm)))
|
(options (wm:options wm)))
|
||||||
(set-client:data! client (make-client-data titlebar resizer #f))
|
(set-client:data! client (make-client-data titlebar resizer #f))
|
||||||
(set-titlebar-title! titlebar (client-name dpy client))
|
(set-titlebar-title! titlebar (client-name dpy client))
|
||||||
(let ((bw (get-option-value options 'border-width))
|
(let* ((bw (get-option-value options 'border-width))
|
||||||
(th (get-option-value options 'titlebar-height)))
|
(th (get-option-value options 'titlebar-height))
|
||||||
|
(x.y (if (window-wants-decoration? dpy (client:window client))
|
||||||
|
(cons (rectangle:x r) (rectangle:y r))
|
||||||
|
(cons (- (rectangle:x r) bw)
|
||||||
|
(- (rectangle:y r) (+ bw th))))))
|
||||||
(move-resize-window dpy (client:client-window client)
|
(move-resize-window dpy (client:client-window client)
|
||||||
(- (rectangle:x r) bw)
|
(car x.y) (cdr x.y)
|
||||||
(- (rectangle:y r) (+ bw th))
|
|
||||||
(+ (rectangle:width r) (* 2 bw))
|
(+ (rectangle:width r) (* 2 bw))
|
||||||
(+ (rectangle:height r) (* 2 bw) th)))
|
(+ (rectangle:height r) (* 2 bw) th)))
|
||||||
(fit-client-windows wm client)
|
(fit-client-windows wm client)
|
||||||
|
@ -397,8 +401,7 @@
|
||||||
(let* ((bw (get-option-value options 'border-width))
|
(let* ((bw (get-option-value options 'border-width))
|
||||||
(th (get-option-value options 'titlebar-height))
|
(th (get-option-value options 'titlebar-height))
|
||||||
(x.y (find-free-position wm client w.h '(0 . 0))))
|
(x.y (find-free-position wm client w.h '(0 . 0))))
|
||||||
(cons (+ (car x.y) bw)
|
x.y))
|
||||||
(+ (cdr x.y) (+ bw th)))))
|
|
||||||
(x.y (desired-position/hints dpy win maybe-x.y)))
|
(x.y (desired-position/hints dpy win maybe-x.y)))
|
||||||
(make-rectangle (car x.y) (cdr x.y)
|
(make-rectangle (car x.y) (cdr x.y)
|
||||||
(car w.h) (cdr w.h))))
|
(car w.h) (cdr w.h))))
|
||||||
|
|
Loading…
Reference in New Issue