Skip to content

Commit

Permalink
Prevent tinywm crash where a window is given a negative height/width
Browse files Browse the repository at this point in the history
  • Loading branch information
mwitmer committed Feb 3, 2014
1 parent 94b7a37 commit 4381636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/guile-wm/module/tinywm.scm
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
#:x (box (xref point 'root-x) (xref geom 'width) (screen-width))
#:y (box (xref point 'root-y) (xref geom 'height) (screen-height)))
(configure-window (win)
#:width (- (xref point 'root-x) (xref geom 'x))
#:height (- (xref point 'root-y) (xref geom 'y))))))
#:width (max 1 (- (xref point 'root-x) (xref geom 'x)))
#:height (max 1 (- (xref point 'root-y) (xref geom 'y)))))))

(define (on-button-release button-release)
(ungrab-pointer xcb-current-time)
Expand Down

0 comments on commit 4381636

Please sign in to comment.