X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=scripts%2Fwindowplacement.py;h=aa9271ba512012bc3a1c17f7baffc72156bf8fb8;hb=28a08b7d68f1168f0e35ef3faaacdf052be55eef;hp=81d260e8188a65bef75f01aaeb2bdaf4b4caf469;hpb=5face4c6f35172761367f63ac0b6eaf62d84e532;p=chaz%2Fopenbox diff --git a/scripts/windowplacement.py b/scripts/windowplacement.py index 81d260e8..aa9271ba 100644 --- a/scripts/windowplacement.py +++ b/scripts/windowplacement.py @@ -1,6 +1,10 @@ ############################################################################ ### Window placement algorithms, choose one of these and ebind it to the ### ### ob.EventAction.PlaceWindow event. ### +### ### +### Also see historyplacement.py for the history placement module which ### +### provides an algorithm that can be used in place of, or alongside, ### +### these. ### ############################################################################ import otk @@ -11,11 +15,10 @@ _rand = random.Random() def random(data): if not data.client: return + if data.client.positionRequested(): return client_area = data.client.area() frame_size = data.client.frame.size() screen_area = ob.openbox.screen(data.screen).area() - print str(screen_area.x()) + " " + str(screen_area.y()) + " " + \ - str(screen_area.width()) + " " + str(screen_area.height()) width = screen_area.width() - (client_area.width() + frame_size.left + frame_size.right) height = screen_area.height() - (client_area.height() +