def add_client(self, client, **kw): self.sizehints[client.win.id] = size_hints.size_hints(win=client.win)
def test_change_to_aspect(self): sh = size_hints(hints=None) self.assertEqual(sh.change_to_aspect(1.0, 40, 90), (40, 40)) self.assertEqual(sh.change_to_aspect(1.0, 90, 40), (40, 40)) self.assertEqual(sh.change_to_aspect(4 / 3.0, 100, 100), (100, 75))
def test_change_to_aspect(self): sh = size_hints(hints=None) self.assertEqual(sh.change_to_aspect(1.0, 40, 90), (40, 40)) self.assertEqual(sh.change_to_aspect(1.0, 90, 40), (40, 40)) self.assertEqual(sh.change_to_aspect(4/3.0, 100, 100), (100, 75))