diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index 3f5e5743f..c29350b7a 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -89,10 +89,10 @@ def grab( if display_name is None and sys.platform not in ("darwin", "win32"): if shutil.which("gnome-screenshot"): args = ["gnome-screenshot", "-f"] - elif shutil.which("spectacle"): - args = ["spectacle", "-n", "-b", "-f", "-o"] elif shutil.which("grim"): args = ["grim"] + elif shutil.which("spectacle"): + args = ["spectacle", "-n", "-b", "-f", "-o"] else: raise fh, filepath = tempfile.mkstemp(".png")