Skip to content

Commit 0b5e3ec

Browse files
committed
don't default to edge when --freeze is given
edge mode never used to work with -f until commit c60a26c. and it seems to be causing a lot of artifacts. so don't default to it if --freeze is active. Ref: #408
1 parent 0ed9211 commit 0b5e3ec

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

man/scrot.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ SELECTION STYLE
169169

170170
mode=MODE MODE can be "auto", "edge" or "classic" without quotes.
171171
edge is the new selection, classic uses the old one.
172-
"auto" uses "edge" if no compositor is running, "classic"
173-
otherwise. "edge" ignores the style specifier, "classic"
174-
ignores the opacity specifier.
172+
"auto" uses "edge" if no compositor is running and -f flag
173+
isn't active, "classic" otherwise. "edge" ignores the style
174+
specifier, "classic" ignores the opacity specifier.
175175

176176
Without the -l option, a default style is used:
177177

src/scrot_selection.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,10 @@ Imlib_Image scrotSelectionSelectMode(void)
410410
char buf[128];
411411
snprintf(buf, sizeof(buf), "_NET_WM_CM_S%d", DefaultScreen(disp));
412412
Atom cm = XInternAtom(disp, buf, False);
413-
/* use edge mode if no compositor is running */
414-
if (XGetSelectionOwner(disp, cm) == None)
413+
/* edge mode has some issues with compositor.
414+
* also doesn't work well in combination with --freeze.
415+
*/
416+
if (XGetSelectionOwner(disp, cm) == None && !opt.freeze)
415417
opt.lineMode = LINE_MODE_EDGE;
416418
else
417419
opt.lineMode = LINE_MODE_CLASSIC;

0 commit comments

Comments
 (0)