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

add sleep to classic selection destroy as well #378

Merged
merged 1 commit into from
May 31, 2024
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
11 changes: 0 additions & 11 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ into the selection area you have created.
Use the `--ignorekeyboard` option. This option prevents exit by
ignoring any keyboard event, except the <kbd>ESC</kbd> key.

### The `--select` option leaves rectangle trails of the selection rectangle. How do I avoid this?

There are 2 ways to solve this:

Try first with: `scrot --select --freeze`

Or using another selection mode: `scrot --select --line mode=edge`

But this last one does not behave correctly with some
CWM (Composite Window Manager)

### Does scrot have a class name?

Yes. The class name is "scrot" and is useful only when using the
Expand Down
5 changes: 5 additions & 0 deletions src/scrot_selection.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ static void scrotSelectionDestroy(void)
freeCursors();
XSync(disp, True);
selection.destroy();
/* HACK: although we destroyed the selection, the frame still might not
* have been updated. a compositor might also buffer frames adding
* latency. so wait a bit for the screen to update and the selection
* borders to go away. */
scrotSleepFor(clockNow(), 80);
}

static void scrotSelectionMotionDraw(int x0, int y0, int x1, int y1)
Expand Down
5 changes: 0 additions & 5 deletions src/selection_edge.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,5 @@ void selectionEdgeDestroy(void)
if (ev.type == UnmapNotify && ev.xunmap.window == pe->wndDraw)
is_unmapped = true;
}
/* HACK: although we recived a DestroyNotify event, the frame still
* might not have been updated. a compositor might also buffer frames
* adding latency. so wait a bit for the screen to update and the
* selection borders to go away. */
scrotSleepFor(clockNow(), 80);
}
}
Loading