Comment 1 for bug 1267257

Revision history for this message
Martin Pitt (pitti) wrote :

I tried that with a single monitor, and with two monitors side by side (either primary at the left or right), and two monitors on top of each other, and it always works for me. But if that doesn't work, I suggest replacing

                self.assertThat(geom[0], GreaterThan(-1)) # no GreaterEquals
                self.assertThat(geom[1], GreaterThan(-1))
                self.assertThat(geom[2], LessThan(swidth + 1))
                self.assertThat(geom[3], LessThan(sheight + 1))

with something less strict. This test was originally written for bug 1258170 as tryign to get the window geometry wasn't working at all and caused crashes, but I thought some plausibility tests couldn't hurt.

Why would a window geometry be negative, or the test window appear partially on two different screens? That would sound odd and like a window manager bug. But if these values make some actual sense, I suggest the test could be changed to merely assert that isinstance(geom[0], int) or something similar.