mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 01:23:47 -07:00
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:
parent
1663bf7b0f
commit
e84b6c8dd4
2 changed files with 13 additions and 4 deletions
|
@ -16,7 +16,9 @@ pause
|
||||||
|
|
||||||
del releases\Greenshot-NO-INSTALLER.zip
|
del releases\Greenshot-NO-INSTALLER.zip
|
||||||
mkdir releases\NO-INSTALLER
|
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\
|
xcopy /S bin\Release\Plugins releases\NO-INSTALLER\Plugins\
|
||||||
copy /B bin\Release\checksum.MD5 releases\NO-INSTALLER
|
copy /B bin\Release\checksum.MD5 releases\NO-INSTALLER
|
||||||
copy /B bin\Release\Greenshot.exe releases\NO-INSTALLER
|
copy /B bin\Release\Greenshot.exe releases\NO-INSTALLER
|
||||||
|
|
|
@ -600,6 +600,13 @@ namespace GreenshotPlugin.Core {
|
||||||
if (isApp) {
|
if (isApp) {
|
||||||
// IAppVisibility appVisibility = COMWrapper.CreateInstance<IAppVisibility>();
|
// IAppVisibility appVisibility = COMWrapper.CreateInstance<IAppVisibility>();
|
||||||
// if (appVisibility != null) {
|
// 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);
|
// IntPtr monitor = User32.MonitorFromWindow(Handle, User32.MONITOR_DEFAULTTONULL);
|
||||||
// if (monitor != IntPtr.Zero) {
|
// if (monitor != IntPtr.Zero) {
|
||||||
// LOG.DebugFormat("Monitor = {0}", monitor);
|
// LOG.DebugFormat("Monitor = {0}", monitor);
|
||||||
|
@ -826,11 +833,11 @@ namespace GreenshotPlugin.Core {
|
||||||
if (!Maximised) {
|
if (!Maximised) {
|
||||||
// Assume using it's own location
|
// Assume using it's own location
|
||||||
formLocation = windowRectangle.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
|
// Find the screen where the window is and check if it fits
|
||||||
foreach (Screen screen in Screen.AllScreens) {
|
foreach (Screen screen in Screen.AllScreens) {
|
||||||
if (screen != Screen.PrimaryScreen) {
|
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) {
|
foreach (Screen screen in Screen.AllScreens) {
|
||||||
Rectangle newWindowRectangle = new Rectangle(screen.WorkingArea.Location, windowRectangle.Size);
|
Rectangle newWindowRectangle = new Rectangle(screen.WorkingArea.Location, windowRectangle.Size);
|
||||||
if (workingArea.AreRectangleCornersVisisble(newWindowRectangle)) {
|
if (workingArea.AreRectangleCornersVisisble(newWindowRectangle)) {
|
||||||
formLocation = screen.WorkingArea.Location;
|
formLocation = screen.Bounds.Location;
|
||||||
doesCaptureFit = true;
|
doesCaptureFit = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue