From fbba70fce4b2c19492619934da8093ca7e7c9ebb Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 29 Dec 2016 20:38:51 +0100 Subject: [PATCH] FEATURE-995: Fine tuning of the paste logic. --- Greenshot/Drawing/Surface.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs index 9dae14bc6..e8b90026d 100644 --- a/Greenshot/Drawing/Surface.cs +++ b/Greenshot/Drawing/Surface.cs @@ -1820,11 +1820,11 @@ namespace Greenshot.Drawing int y = 10; // FEATURE-995: Added a check for the current mouse cursor location, to paste the image on that location. - var mousePos = PointToClient(MousePosition); - if (Bounds.Contains(mousePos)) + var mousePositionOnControl = PointToClient(MousePosition); + if (ClientRectangle.Contains(mousePositionOnControl)) { - x = mousePos.X; - y = mousePos.Y; + x = mousePositionOnControl.X; + y = mousePositionOnControl.Y; } foreach (Image clipboardImage in ClipboardHelper.GetImages(clipboard))