Skip to content

Commit

Permalink
Bug re-fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSparTV committed Apr 29, 2019
1 parent edd8416 commit 0a10ee3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ This program was made originally from [DeeShell by pravin](https://github.com/pr
- Close app (RMB)
- Kill app (RMB)
- Time and date
- Language display
- Language indicator
- Minimize/Unminimize all
- If app was closed icon will be removed too

## Problems:
- Some non-windowed apps can be in a list (idk how to get rid of them, why does Calculator run on my PC when I didn't opened it)
- You won't see the icons from right side of legacy task bar (Wi-Fi icon, Notification panel, Calendar, Flash drive remove, etc)
- SparTask uses app's icons from their **.exe**. So Discord icon will not have any notification badges.
- Sometimes language indicator will show **EN**. That's because he is unable to get that info. (From cmd.exe for example)

## Installation:
- Download from [releases](https://github.com/GitSparTV/SparTask/releases)
Expand Down
4 changes: 2 additions & 2 deletions SparTask/Taskbar.Designer.cs

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

7 changes: 5 additions & 2 deletions SparTask/WinAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ public static string GetProcessPath(IntPtr hwnd)

public static System.Globalization.CultureInfo GetCurrentCulture()
{
var l = GetKeyboardLayout(GetWindowThreadProcessId(GetForegroundWindow(), IntPtr.Zero));
return new System.Globalization.CultureInfo((short)l.ToInt64());
IntPtr foregroundWindow = GetForegroundWindow();
uint foregroundProcess = GetWindowThreadProcessId(foregroundWindow, IntPtr.Zero);
int keyboardLayout = GetKeyboardLayout(foregroundProcess).ToInt32() & 0xFFFF;
if (keyboardLayout == 0) return new System.Globalization.CultureInfo(1033);
return new System.Globalization.CultureInfo(keyboardLayout);
}

[DllImport("user32.dll", EntryPoint = "SendMessage", SetLastError = true)]
Expand Down

0 comments on commit 0a10ee3

Please sign in to comment.