-
Notifications
You must be signed in to change notification settings - Fork 103
Description
eeca245#diff-edcdafb16305fe4747c08e7f8913fabb4030b769d5d204c6672d949b9daaee0aR64
I had to install pyautogui on a few machines recently and in all cases I had problem with gnome-screenshot being required by the script.
It maybe fixes the wayland issue, but it makes X11'ers life more difficult by forcing us to use gnome-screenshot.
on X11, if gnome-screenshot is used, there are issues like "briefly black screen" while taking the screenshot.
Pyautogui uses pyscreeze to take a screenshot.
I don't have (nor want to use) gnome-screenshot, but it is impossible to not use it.
if PILLOW_VERSION >= (9, 2, 0) and GNOMESCREENSHOT_EXISTS:
The "GNOMESCREENSHOT_EXISTS" blocks the whole screenshot code, jumping straight to
else: raise Exception(....
On each of my machine I had to manually change the source file of pyscreeze and just remove "and GNOMESCREENSHOT_EXISTS".
After this change
if PILLOW_VERSION >= (9, 2, 0):
goes through and the script takes a screenshot no-problemo without gnome-screenshot.
So unless I'm doing something wrong, and unless the author of pyscreeze wants to force us to use gnome-screenshot, maybe it would be a good idea to review the code, to allow non-gnome-screenshot users to take a screenshot on X11.
(Because by looking at the commit, the commit fixed pyscreeze on wayland, but broke it on X11 that doesn't use gnome-screenshot)