<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>whimsy/models/layout.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -7,6 +7,7 @@ from Xlib.support.connect import get_display
 
 from whimsy.signals import publisher
 from whimsy.models.window_manager import window_manager
+from whimsy.models.layout import layout
 from whimsy.controllers.x_event_controller import x_event_controller
 from whimsy.controllers.tick_controller import tick_controller
 
@@ -23,6 +24,7 @@ class main(object):
         self.dpy    = display.Display()
         self.hub    = publisher()
         self.wm     = window_manager(self.hub, self.dpy)
+        self.layout = layout(self.hub, self.wm)
         self.xec    = x_event_controller(self.hub, self.dpy)
         self.ticker = tick_controller(self.hub)
 </diff>
      <filename>whimsy/main.py</filename>
    </modified>
    <modified>
      <diff>@@ -27,8 +27,6 @@ class managed_client(object):
         getgeom = self.win.get_geometry()
         self.geom = Rect(getgeom.x, getgeom.y, getgeom.width, getgeom.height)
 
-        self.sizehints = size_hints.size_hints(win=self.win)
-
         self.props = {}
 
         #self.grab_all()
@@ -64,7 +62,7 @@ class managed_client(object):
     def moveresize(self, **kw):
         for k, v in kw.items():
             setattr(self.geom, k, v)
-        self.apply_constraints()
+        self.hub.emit('before_moveresize_client', client=self)
         self.win.configure(
             x=self.geom[0],
             y=self.geom[1],
@@ -72,15 +70,6 @@ class managed_client(object):
             height=self.geom[3],
         )
 
-    def apply_constraints(self):
-        sh = self.sizehints
-        w, h = self.geom.size
-        w, h = sh.fix_min(w, h)
-        w, h = sh.fix_max(w, h)
-        w, h = sh.fix_increments(w, h)
-        w, h = sh.fix_aspect(w, h)
-        self.geom.size = w, h
-
     def out_of_viewport(self, wm):
         return not self.geom.colliderect(wm.root_geometry)
 </diff>
      <filename>whimsy/models/client.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bf4fb75c039495db317ea304674585cf94c35e96</id>
    </parent>
  </parents>
  <author>
    <name>Nick Welch</name>
    <email>mack@incise.org</email>
  </author>
  <url>http://github.com/mackstann/whimsy/commit/8cf7be95e35ae2d685784245c2eaea862e46829e</url>
  <id>8cf7be95e35ae2d685784245c2eaea862e46829e</id>
  <committed-date>2008-11-24T15:45:34-08:00</committed-date>
  <authored-date>2008-11-24T15:45:34-08:00</authored-date>
  <message>move responsibility for size hints to new layout model</message>
  <tree>5ef6bea971a5e66ec4da8d8df111bc057c340105</tree>
  <committer>
    <name>Nick Welch</name>
    <email>mack@incise.org</email>
  </committer>
</commit>
