Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force resize #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions BorderlessGaming.Logic/Core/ProcessWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,25 @@ private async void Watch()
}
}

public void ResetMadeBorderless(Favorite fav)
{
foreach (var pd in Processes)
{
try
{
if (fav.Matches(pd))
{
pd.MadeBorderless = false;
pd.MadeBorderlessAttempts = 0;
}
}
catch
{
// ignored
}
}
}

/// <summary>
/// remove the menu, resize the window, remove border, and maximize
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions BorderlessGaming/BorderlessGaming.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@
$(PostBuildEventDependsOn);
PostBuildMacros;
</PostBuildEventDependsOn>
<PostBuildEvent>call signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 3BD5BE571287FE2052F137C44198AE7BAB38B037 "$(ProjectDir)$(OutDir)$(TargetFileName)"
call iscc /Qp "$(SolutionDir)\Installers\BorderlessGaming_Standalone_Admin.iss"
call signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 3BD5BE571287FE2052F137C44198AE7BAB38B037 "$(SolutionDir)Installers\BorderlessGaming@(VersionNumber)_admin_setup.exe"</PostBuildEvent>
<!--<PostBuildEvent>call signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 3BD5BE571287FE2052F137C44198AE7BAB38B037 "$(ProjectDir)$(OutDir)$(TargetFileName)"-->
<!--call iscc /Qp "$(SolutionDir)\Installers\BorderlessGaming_Standalone_Admin.iss"-->
<!--call signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 3BD5BE571287FE2052F137C44198AE7BAB38B037 "$(SolutionDir)Installers\BorderlessGaming@(VersionNumber)_admin_setup.exe"</PostBuildEvent>-->
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>copy $(SolutionDir)SteamLibs\* $(ProjectDir)$(OutDir)</PreBuildEvent>
Expand Down
12 changes: 12 additions & 0 deletions BorderlessGaming/Forms/MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions BorderlessGaming/Forms/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,11 @@ private void delayBorderlessToolStripMenuItem_Click(object sender, EventArgs e)
RefreshFavoritesList(fav);
}

private void toolStripForceResize_Click(object sender, EventArgs e)
{
_watcher.ResetMadeBorderless((Favorite) lstFavorites.SelectedItem);
}

/// <summary>
/// Sets up the Favorite-ContextMenu according to the current state
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions BorderlessGaming/Forms/MainWindow.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@
<data name="toolStripDelayBorderless.Size" type="System.Drawing.Size, System.Drawing">
<value>207, 22</value>
</data>
<data name="toolStripForceResize.Size" type="System.Drawing.Size, System.Drawing">
<value>207, 22</value>
</data>
<data name="toolStripHideMouseCursor.Size" type="System.Drawing.Size, System.Drawing">
<value>207, 22</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions BorderlessGaming/Forms/MainWindow.resx
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,9 @@
<data name="toolStripDelayBorderless.Text" xml:space="preserve">
<value>Delay Borderless Window</value>
</data>
<data name="toolStripForceResize.Text" xml:space="preserve">
<value>Force Resize</value>
</data>
<data name="&gt;&gt;toolStripOptions.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
Expand All @@ -687,6 +690,9 @@
<data name="&gt;&gt;toolStripDelayBorderless.Name" xml:space="preserve">
<value>toolStripDelayBorderless</value>
</data>
<data name="toolStripForceResize.Name" xml:space="preserve">
<value>toolStripForceResize</value>
</data>
<data name="trayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAICAAAAEACACoCAAAZgAAABgYAAABAAgAyAYAAA4JAAAQEAAAAQAIAGgFAADWDwAAQEAAAAEA
Expand Down
3 changes: 2 additions & 1 deletion Languages/en-US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ toolStripAutomaximize|Auto-Maximize
toolStripAdjustWindowBounds|Adjust Window bounds
toolStripAlwaysOnTop|Always On Top
toolStripDelayBorderless|Delay Borderless Window
toolStripForceResize|Force Resize
toolStripHideMouseCursor|Hide Mouse Cursor
toolStripHideWindowsTaskbar|Hide Windows Taskbar
toolStripRemoveMenus|Remove Menus
Expand All @@ -80,4 +81,4 @@ steamHint|Prevents "In-App" on Steam
addFavorite|Adds the currently-selected application to your favorites list (by the window title).
removeFavorite|Removes the currently-selected favorite from the list.
makeBorderless|Makes the currently-selected application borderless.
restoreBorders|Attempts to restore a window back to its bordered state.
restoreBorders|Attempts to restore a window back to its bordered state.