Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"and GNOMESCREENSHOT_EXISTS" makes life difficult. #130

Open
kuchikuu opened this issue Dec 8, 2024 · 0 comments
Open

"and GNOMESCREENSHOT_EXISTS" makes life difficult. #130

kuchikuu opened this issue Dec 8, 2024 · 0 comments

Comments

@kuchikuu
Copy link

kuchikuu commented Dec 8, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant