Skip to content

Commit

Permalink
Merge pull request #33 from beyluta/development
Browse files Browse the repository at this point in the history
Remove widgets from app switcher
  • Loading branch information
beyluta authored Mar 19, 2023
2 parents e1565c1 + 95533f2 commit f60ebe0
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 25 deletions.
Binary file added 48favicon.ico
Binary file not shown.
9 changes: 9 additions & 0 deletions Abstract/WidgetWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ public void SetWindowTransparency(IntPtr handle, byte alpha)
SetLayeredWindowAttributes(handle, 0, alpha, LWA_ALPHA);
}

/// <summary>
/// Hides the window from the program switcher (alt + tab shortcut)
/// </summary>
/// <param name="handle">Handle of the window</param>
public void HideWindowFromProgramSwitcher(IntPtr handle)
{
SetWindowLong(handle, GWL_EXSTYLE, GetWindowLong(handle, GWL_EXSTYLE) | WS_EX_TOOLWINDOW);
}

/// <summary>
/// Searches for the value of a meta tag by name
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Assets/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.1.8",
"version": "1.2.0",
"remoteResources": "https://7xdeveloper.com/api/AccessEndpoint.php?endpoint=getappconfigs&id=resources"
}
1 change: 1 addition & 0 deletions Classes/Widget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ @@ Extracting the <meta> tags from the html document.
window.BackColor = Color.Black;

SetWindowTransparency(window.Handle, opacity);
HideWindowFromProgramSwitcher(window.Handle);
AppendWidget(window, widgetPath);
window.ShowDialog();
}).Start();
Expand Down
2 changes: 1 addition & 1 deletion Classes/WidgetsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private void SendNativeKeyEvents(string data)
{
foreach (Widget widget in WidgetAssets.widgets.Widgets)
{
widget.browser.ExecuteScriptAsync("onNativeKeyEvents(" + data + ")");
widget.browser.ExecuteScriptAsync("if (typeof onNativeKeyEvents === 'function') { onNativeKeyEvents(" + data + "); }");
}
}

Expand Down
1 change: 1 addition & 0 deletions Classes/WindowEssentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ internal class WindowEssentials
{
public const int GWL_EXSTYLE = -20;
public const int WS_EX_LAYERED = 0x80000;
public const int WS_EX_TOOLWINDOW = 0x00000080;
public const int LWA_ALPHA = 0x2;
public const int HIDE_HOTKEY_ID = 0;

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://github.com/beyluta/WinWidgets">
<img src="https://img.shields.io/badge/Version-1.1.8-green" alt="WinWidgets version" />
<img src="https://img.shields.io/badge/Version-1.2.0-green" alt="WinWidgets version" />
</a>
</p>

Expand Down
35 changes: 18 additions & 17 deletions WidgetsDotNet.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props')" />
<Import Project="packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props" Condition="Exists('packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props')" />
<Import Project="packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props" Condition="Exists('packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props')" />
<Import Project="packages\CefSharp.Common.111.2.20\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.111.2.20\build\CefSharp.Common.props')" />
<Import Project="packages\cef.redist.x86.111.2.2\build\cef.redist.x86.props" Condition="Exists('packages\cef.redist.x86.111.2.2\build\cef.redist.x86.props')" />
<Import Project="packages\cef.redist.x64.111.2.2\build\cef.redist.x64.props" Condition="Exists('packages\cef.redist.x64.111.2.2\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -37,10 +37,10 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
<ApplicationIcon>48favicon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
Expand All @@ -61,20 +61,20 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.102.0.90\lib\net452\CefSharp.dll</HintPath>
<Reference Include="CefSharp, Version=111.2.20.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.111.2.20\lib\net452\CefSharp.dll</HintPath>
</Reference>
<Reference Include="CefSharp.Core, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.102.0.90\lib\net452\CefSharp.Core.dll</HintPath>
<Reference Include="CefSharp.Core, Version=111.2.20.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.111.2.20\lib\net452\CefSharp.Core.dll</HintPath>
</Reference>
<Reference Include="CefSharp.WinForms, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.WinForms.102.0.90\lib\net462\CefSharp.WinForms.dll</HintPath>
<Reference Include="CefSharp.WinForms, Version=111.2.20.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.WinForms.111.2.20\lib\net462\CefSharp.WinForms.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.11.46.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>packages\HtmlAgilityPack.1.11.46\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
Expand Down Expand Up @@ -122,6 +122,7 @@
<None Include="WidgetsDotNet_1_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="48favicon.ico" />
<Content Include="Assets\favicon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -151,10 +152,10 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('packages\cef.redist.x64.111.2.2\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.111.2.2\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('packages\cef.redist.x86.111.2.2\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.111.2.2\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.111.2.20\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.111.2.20\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.111.2.20\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.111.2.20\build\CefSharp.Common.targets'))" />
</Target>
<Import Project="packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets')" />
<Import Project="packages\CefSharp.Common.111.2.20\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.111.2.20\build\CefSharp.Common.targets')" />
</Project>
10 changes: 5 additions & 5 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="102.0.9" targetFramework="net472" />
<package id="cef.redist.x86" version="102.0.9" targetFramework="net472" />
<package id="CefSharp.Common" version="102.0.90" targetFramework="net472" />
<package id="CefSharp.WinForms" version="102.0.90" targetFramework="net472" />
<package id="cef.redist.x64" version="111.2.2" targetFramework="net472" />
<package id="cef.redist.x86" version="111.2.2" targetFramework="net472" />
<package id="CefSharp.Common" version="111.2.20" targetFramework="net472" />
<package id="CefSharp.WinForms" version="111.2.20" targetFramework="net472" />
<package id="HtmlAgilityPack" version="1.11.46" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
</packages>

0 comments on commit f60ebe0

Please sign in to comment.