No need to consider the working area, as the Window is topmost and is visible "over" the Taskbar

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2271 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-11-12 16:52:44 +00:00
parent 1663bf7b0f
commit e84b6c8dd4
2 changed files with 13 additions and 4 deletions

View file

@ -16,7 +16,9 @@ pause
del releases\Greenshot-NO-INSTALLER.zip
mkdir releases\NO-INSTALLER
echo dummy config, used to make greenshot store the configuration in this directory > releases\NO-INSTALLER\greenshot.ini
echo ;dummy config, used to make greenshot store the configuration in this directory > releases\NO-INSTALLER\greenshot.ini
echo ;In this file you should add your default settings > releases\NO-INSTALLER\greenshot-defaults.ini
echo ;In this file you should add your fixed settings > releases\NO-INSTALLER\greenshot-fixed.ini
xcopy /S bin\Release\Plugins releases\NO-INSTALLER\Plugins\
copy /B bin\Release\checksum.MD5 releases\NO-INSTALLER
copy /B bin\Release\Greenshot.exe releases\NO-INSTALLER

View file

@ -600,6 +600,13 @@ namespace GreenshotPlugin.Core {
if (isApp) {
// IAppVisibility appVisibility = COMWrapper.CreateInstance<IAppVisibility>();
// if (appVisibility != null) {
//foreach (Screen screen in Screen.AllScreens) {
// RECT rect = new RECT(screen.Bounds);
// IntPtr monitor = User32.MonitorFromRect(ref rect, User32.MONITOR_DEFAULTTONULL);
// if (monitor != IntPtr.Zero) {
// LOG.DebugFormat("Monitor {0} has hMonitor {1}", screen.DeviceName, monitor);
// }
//}
// IntPtr monitor = User32.MonitorFromWindow(Handle, User32.MONITOR_DEFAULTTONULL);
// if (monitor != IntPtr.Zero) {
// LOG.DebugFormat("Monitor = {0}", monitor);
@ -826,11 +833,11 @@ namespace GreenshotPlugin.Core {
if (!Maximised) {
// Assume using it's own location
formLocation = windowRectangle.Location;
using (Region workingArea = new Region(Screen.PrimaryScreen.WorkingArea)) {
using (Region workingArea = new Region(Screen.PrimaryScreen.Bounds)) {
// Find the screen where the window is and check if it fits
foreach (Screen screen in Screen.AllScreens) {
if (screen != Screen.PrimaryScreen) {
workingArea.Union(screen.WorkingArea);
workingArea.Union(screen.Bounds);
}
}
@ -840,7 +847,7 @@ namespace GreenshotPlugin.Core {
foreach (Screen screen in Screen.AllScreens) {
Rectangle newWindowRectangle = new Rectangle(screen.WorkingArea.Location, windowRectangle.Size);
if (workingArea.AreRectangleCornersVisisble(newWindowRectangle)) {
formLocation = screen.WorkingArea.Location;
formLocation = screen.Bounds.Location;
doesCaptureFit = true;
break;
}