Skip to content

Commit

Permalink
Merge pull request #101 from psouza4/master
Browse files Browse the repository at this point in the history
Version 7.8
  • Loading branch information
Andrew Sampson committed Jan 15, 2015
2 parents 15493d4 + 36b251b commit c7c274a
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 15 deletions.
5 changes: 3 additions & 2 deletions BorderlessGaming.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<ApplicationIcon>BorderlessGaming.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationManifest>app.Launch as User.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<StartupObject>BorderlessGaming.Program</StartupObject>
Expand Down Expand Up @@ -147,7 +147,8 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.de.resx" />
<None Include="app.manifest" />
<None Include="app.Launch as User.manifest" />
<None Include="app.Launch as Elevated.manifest" />
<None Include="data\blank.cur" />
<None Include="packages.config" />
</ItemGroup>
Expand Down
34 changes: 28 additions & 6 deletions Forms/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -885,30 +885,50 @@ private void MainWindow_Shown(object sender, EventArgs e)
}

/// <summary>
/// Unregisters the hotkeys on closing
/// Cleans up when the application exits (main form closes)
/// </summary>
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
{
// Not allowed to exit the application if we've hidden the Windows taskbar.
//
// Make them exit the game that triggered the taskbar to be hidden -- or -- use a global hotkey to restore it.
if (Manipulation.WindowsTaskbarIsHidden)
{
this.ClosingFromExitMenu = false;
e.Cancel = true;
return;
}

// If we're exiting -- or -- if we're closing-to-tray, then restore the mouse cursor.
//
// This prevents a scenario where the user can't (easily) get back to Borderless Gaming to undo the hidden mouse cursor.
Manipulation.ToggleMouseCursorVisibility(this, Tools.Boolstate.True);

if (AppEnvironment.SettingValue("CloseToTray", false))
// If the user didn't choose to exit from the tray icon context menu...
if (!this.ClosingFromExitMenu)
{
this.WindowState = FormWindowState.Minimized;
e.Cancel = true;
return;
// ... and they have the preference set to close-to-tray ...
if (AppEnvironment.SettingValue("CloseToTray", false))
{
// ... then minimize the app and do not exit (minimizing will trigger another event to hide the form)
this.WindowState = FormWindowState.Minimized;
e.Cancel = true;
return;
}
}

// At this point, we're okay to exit the application

// Unregister all global hotkeys
this.UnregisterHotkeys();

// Hide the tray icon. If we don't do this, then Environment.Exit() can sometimes ghost the icon in the
// Windows system tray area.
this.trayIcon.Visible = false;

// Overkill... the form should just close naturally.
// Overkill... the form should just close naturally. Ideally we would just allow the form to close and
// the remaining code in Program.cs would execute (if there were any), but this is how Borderless Gaming has
// always exited and there may be a compatibility reason for it, so leaving it alone for now.
Environment.Exit(0);
}

Expand Down Expand Up @@ -946,8 +966,10 @@ private void trayIcon_DoubleClick(object sender, EventArgs e)
this.WindowState = FormWindowState.Normal;
}

private bool ClosingFromExitMenu = false;
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.ClosingFromExitMenu = true;
this.Close();
}

Expand Down
6 changes: 3 additions & 3 deletions Installer/BorderlessGaming.iss
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ DisableProgramGroupPage=yes
DirExistsWarning=no

; Shown as installed version (Programs & Features) as well as product version ('Details' tab when right-clicking setup program and choosing 'Properties')
AppVersion=7.7
AppVersion=7.8
; Stored in the version info for the setup program itself ('Details' tab when right-clicking setup program and choosing 'Properties')
VersionInfoVersion=7.7.1015.1177
VersionInfoVersion=7.8.1415.1112
; Other version info
OutputBaseFilename=BorderlessGaming_7.7__setup
OutputBaseFilename=BorderlessGaming_7.8__setup


; Shown in the setup program during install only
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("7.7.1015.1177")]
[assembly: AssemblyFileVersion("7.7.1015.1177")]
[assembly: AssemblyVersion("7.8.1415.1112")]
[assembly: AssemblyFileVersion("7.8.1415.1112")]
[assembly: NeutralResourcesLanguage("en-US")]
58 changes: 58 additions & 0 deletions app.Launch as Elevated.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel node will disable file and registry virtualization.
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with.
Windows will automatically select the most compatible environment.-->

<!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->

<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

<!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->

<!-- If your application is designed to work with Windows 8.1, uncomment the following supportedOS node-->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->

</application>
</compatibility>

<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!-- <dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>-->

</asmv1:assembly>
2 changes: 1 addition & 1 deletion app.manifest → app.Launch as User.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<borderlessgaming>
<version>7.7</version>
<version>7.8</version>
<url>https://github.com/Codeusa/Borderless-Gaming/releases/latest</url>
</borderlessgaming>

0 comments on commit c7c274a

Please sign in to comment.