Skip to content

don't default to edge when --freeze is given #410

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions man/scrot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ SELECTION STYLE

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

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

Expand Down
6 changes: 4 additions & 2 deletions src/scrot_selection.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,10 @@ Imlib_Image scrotSelectionSelectMode(void)
char buf[128];
snprintf(buf, sizeof(buf), "_NET_WM_CM_S%d", DefaultScreen(disp));
Atom cm = XInternAtom(disp, buf, False);
/* use edge mode if no compositor is running */
if (XGetSelectionOwner(disp, cm) == None)
/* edge mode has some issues with compositor.
* also doesn't work well in combination with --freeze.
*/
if (XGetSelectionOwner(disp, cm) == None && !opt.freeze)
opt.lineMode = LINE_MODE_EDGE;
else
opt.lineMode = LINE_MODE_CLASSIC;
Expand Down