From 3a5b3d63a90514165f4948ed0ca0074a6fc7d095 Mon Sep 17 00:00:00 2001 From: JKlingen Date: Sun, 2 Dec 2012 18:47:22 +0000 Subject: [PATCH] fixed lower part of screen not being invalidated correctly in case of negative screen coordinates in multiscreen setup git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2346 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/CaptureForm.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs index 55ece2082..bde9643d3 100644 --- a/Greenshot/Forms/CaptureForm.cs +++ b/Greenshot/Forms/CaptureForm.cs @@ -468,18 +468,22 @@ namespace Greenshot.Forms { } } else { if (!conf.OptimizeForRDP) { + Rectangle allScreenBounds = WindowCapture.GetScreenBounds(); + allScreenBounds.Location = WindowCapture.GetLocationRelativeToScreenBounds(allScreenBounds.Location); if (verticalMove) { - Rectangle before = GuiRectangle.GetGuiRectangle(WindowCapture.GetScreenBounds().Left, lastPos.Y - 2, this.Width+2, 45); - Rectangle after = GuiRectangle.GetGuiRectangle(WindowCapture.GetScreenBounds().Left, cursorPos.Y - 2, this.Width+2, 45); + Rectangle before = GuiRectangle.GetGuiRectangle(allScreenBounds.Left, lastPos.Y - 2, this.Width+2, 45); + Rectangle after = GuiRectangle.GetGuiRectangle(allScreenBounds.Left, cursorPos.Y - 2, this.Width+2, 45); Invalidate(before); Invalidate(after); } if (horizontalMove) { - Rectangle before = GuiRectangle.GetGuiRectangle(lastPos.X - 2, WindowCapture.GetScreenBounds().Top, 75, this.Height+2); - Rectangle after = GuiRectangle.GetGuiRectangle(cursorPos.X -2, WindowCapture.GetScreenBounds().Top, 75, this.Height+2); + Rectangle before = GuiRectangle.GetGuiRectangle(lastPos.X - 2, allScreenBounds.Top, 75, this.Height+2); + Rectangle after = GuiRectangle.GetGuiRectangle(cursorPos.X -2, allScreenBounds.Top, 75, this.Height+2); Invalidate(before); Invalidate(after); + LOG.Info(after); } + } } }