Skip to content

Commit fa1c88d

Browse files
committed
XSync after selection.destroy() not before
removes XFlush from selectionClassicDestroy as it's now redundant. also changes discard argument to false, not sure why it was true to begin with. Maybe-fixes: #387
1 parent fd437b3 commit fa1c88d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/scrot_selection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ static void scrotSelectionDestroy(void)
160160
{
161161
XUngrabPointer(disp, CurrentTime);
162162
freeCursors();
163-
XSync(disp, True);
164163
selection.destroy();
164+
XSync(disp, False);
165165
/* HACK: although we destroyed the selection, the frame still might not
166166
* have been updated. a compositor might also buffer frames adding
167167
* latency. so wait a bit for the screen to update and the selection

src/selection_classic.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,4 @@ void selectionClassicDestroy(void)
9999

100100
if (pc->gc)
101101
XFreeGC(disp, pc->gc);
102-
103-
XFlush(disp);
104102
}

0 commit comments

Comments
 (0)