Skip to content

Commit d2f030e

Browse files
committed
always ring the bell after taking the shot
currently it only rings it after certain cases but not all. move the bell ringing outside of grab mode specific code and into main() where it will be consistently rang in case of a successful capture regardless of grab mode. Fixes: #412
1 parent 7a169bc commit d2f030e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/scrot.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ int main(int argc, char *argv[])
151151
}
152152
tm = localtime(&timeStamp.tv_sec);
153153

154+
if (!opt.silent)
155+
XBell(disp, 0);
156+
154157
if (opt.note)
155158
scrotNoteDraw(image);
156159

@@ -624,8 +627,6 @@ static int scrotMatchWindowClassName(Window target)
624627

625628
static Imlib_Image scrotGrabShot(void)
626629
{
627-
if (!opt.silent)
628-
XBell(disp, 0);
629630
return scrotGrabRectAndPointer(0, 0, scr->width, scr->height, false);
630631
}
631632

src/scrot_selection.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ static bool scrotSelectionGetUserSel(struct SelectionRect *selectionRect)
345345
}
346346
scrotNiceClip(&rx, &ry, &rw, &rh);
347347

348-
if (!opt.silent)
349-
XBell(disp, 0);
350-
351348
selectionRect->x = rx;
352349
selectionRect->y = ry;
353350
selectionRect->w = rw;

0 commit comments

Comments
 (0)