forked from phendryx/superputty
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another hack for my quest to have the putty window properly focused. This deals with when you maximize/restore and minimize & restore. Previously, the putty window will lose focus. Not anymore!
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace SuperPutty.Classes | ||
{ | ||
class RestoreFromMinimizedTracker : WindowEventHandler | ||
{ | ||
const int EVENT_SYSTEM_MINIMIZEEND = 23; | ||
|
||
public RestoreFromMinimizedTracker(frmSuperPutty form) : base(form) | ||
{ | ||
HookEvent(EVENT_SYSTEM_MINIMIZEEND); | ||
} | ||
|
||
protected override void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime) | ||
{ | ||
if (hwnd == this.m_form.Handle) | ||
{ | ||
this.m_form.FocusCurrentTab(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters