X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=scripts%2Fbuiltins.py;h=9b759e7ba12b5efc69260e85a9bc6f900d589672;hb=d8d9b42777ace234f3471918e1210062578f8188;hp=ecc70fd68d33435a9d9a7e65186e26a38f64adfb;hpb=d911b4b15424aa283a7a309a38d0033a61f151b1;p=chaz%2Fopenbox diff --git a/scripts/builtins.py b/scripts/builtins.py index ecc70fd6..9b759e7b 100644 --- a/scripts/builtins.py +++ b/scripts/builtins.py @@ -317,11 +317,13 @@ ob_rand = None import random def placewindows_random(data): if not data.client: return - frame_area = data.client.frame.area() + client_area = data.client.area() + frame_size = data.client.frame.size() screen = display.screenInfo(data.screen) - # XXX - USE THE FRAME'S SIZE!! - width = screen.width() - frame_area.width() - height = screen.height() - frame_area.height() + width = screen.width() - (client_area.width() + + frame_size.left + frame_size.right) + height = screen.height() - (client_area.height() + + frame_size.top + frame_size.bottom) global ob_rand if not ob_rand: ob_rand = random.Random() x = ob_rand.randrange(0, width-1)