Skip to content

Commit

Permalink
Merge pull request #3 from alirezagsm/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
alirezagsm authored Apr 6, 2024
2 parents 076fa07 + d2ca30b commit 140ee1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Ever wished you could tell some apps to chill in the system tray? </br>Say hello

<p align="center">
<img src="demo.png" alt="GUI demo" height="375" width="auto"/>
<img src="demo.gif" alt="Video demo" width="auto" height="375"/>
<img src="demo.gif" alt="Video demo" width="auto" height="375" autoplay/>
</p>

**Pro Move**: Let Trayy join your startup squad! Add Trayy's shortcut to your `shell:startup` folder, along with all your other favorite apps you want to keep tucked away in the system tray. For WebApps, you can ask your browser to add their shortcuts to your Desktop. Then, simply move those shortcuts into the startup folder. Trayy will chill for a bit, letting the startup process finish, then swoop in to tidy everything up! It's a game changer for chat and calendar apps!
Expand Down
5 changes: 3 additions & 2 deletions Trayy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ static void RestoreWindowFromTray(HWND hwnd) {
SetForegroundWindow(hwnd);
return;
}
if (NOTASKBAR && hwndOwner != hwndBase) {
if (NOTASKBAR) {
SetWindowLongPtr(hwnd, GWLP_HWNDPARENT, (LONG_PTR)hwndBase);
}
else if (hwndOwner == hwndBase) {
else {
SetWindowLongPtr(hwnd, GWLP_HWNDPARENT, 0);
}
ShowWindow(hwnd, SW_SHOW);
Expand Down Expand Up @@ -646,6 +646,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {

void CALLBACK WinEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime)
{

if (event == EVENT_SYSTEM_FOREGROUND)
{
if (GetForegroundWindow() == hwnd) { // good for windows things
Expand Down

0 comments on commit 140ee1c

Please sign in to comment.