bugfix: prevent crash if the window is bigger than the screen

pull/37/head 18.1.2
seebye 5 years ago
parent a35df57ee4
commit 04b7fa7f47

@ -41,7 +41,7 @@ setuptools.setup(
# For a discussion on single-sourcing the version across setup.py and the
# project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='18.1.1', # Required
version='18.1.2', # Required
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:

@ -189,7 +189,9 @@ class OverlayWindow:
self._image.copy_to(
self.window.id,
0, 0, self._width, self._height)
0, 0,
min(self._width, self._screen.width_in_pixels),
min(self._height, self._screen.height_in_pixels))
self.window.shape_rectangles(
Xshape.SO.Set, Xshape.SK.Bounding, 0,
0, 0, rectangles)

Loading…
Cancel
Save