From d8766ba562a7bb8cb347cff3a04cc87eb1368c1e Mon Sep 17 00:00:00 2001 From: Omar Ahmad <25300994+OmarSquircleArt@users.noreply.github.com> Date: Mon, 29 Apr 2019 20:41:00 +0200 Subject: [PATCH] Fix XSelectWindow function (#1563) --- MagickCore/xwindow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index 2a188cb40..3cbebc39d 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -9315,6 +9315,7 @@ static Window XSelectWindow(Display *display,RectangleInfo *crop_info) target_window=(Window) NULL; x_offset=0; y_offset=0; + (void) XGrabServer(display); do { if ((crop_info->width*crop_info->height) >= MinimumCropArea) @@ -9383,6 +9384,7 @@ static Window XSelectWindow(Display *display,RectangleInfo *crop_info) break; } } while ((target_window == (Window) NULL) || (presses > 0)); + (void) XUngrabServer(display); (void) XUngrabPointer(display,CurrentTime); (void) XFreeCursor(display,target_cursor); (void) XFreeGC(display,annotate_context); -- 2.40.0