cancel interactive window selection with right button press

This commit is contained in:
Cristy
2024-08-02 18:26:05 -04:00
parent 2a69677d2e
commit ea2a2db8a2
+4 -5
View File
@@ -5064,10 +5064,7 @@ MagickExport Image *XImportImage(const ImageInfo *image_info,
image=XGetWindowImage(display,target,ximage_info->borders,
ximage_info->descend ? 1U : 0U,exception);
(void) XUngrabServer(display);
if (image == (Image *) NULL)
ThrowXWindowException(XServerError,"UnableToReadXWindowImage",
image_info->filename)
else
if (image != (Image *) NULL)
{
(void) CopyMagickString(image->filename,image_info->filename,
MagickPathExtent);
@@ -9340,7 +9337,7 @@ static Window XSelectWindow(Display *display,RectangleInfo *crop_info)
annotate_context=XCreateGC(display,root_window,(size_t) (GCBackground |
GCForeground | GCFunction | GCSubwindowMode),&context_values);
if (annotate_context == (GC) NULL)
return(MagickFalse);
return((Window) NULL);
/*
Grab the pointer using target cursor.
*/
@@ -9443,6 +9440,8 @@ static Window XSelectWindow(Display *display,RectangleInfo *crop_info)
}
if ((crop_info->width != 0) && (crop_info->height != 0))
target_window=root_window;
if (event.xbutton.button == Button3)
target_window=(Window) NULL;
return(target_window);
}