Skip to content

Commit

Permalink
Merge pull request #73 from idietmoran/iss65
Browse files Browse the repository at this point in the history
Iss65
  • Loading branch information
Stateford authored Oct 4, 2018
2 parents cd98efe + 9c11ed8 commit e583d63
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file
### Added
- Added a system tray icon
- Display Lock will now minimize to the system tray
- Added support for hotkeys

### Fixed
- Fixed an issue where the minimize setting would not function properly

# [2.0.1]
### Fixed
Expand Down
5 changes: 3 additions & 2 deletions Display-Lock/DisplayLock.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,15 @@ INT_PTR CALLBACK windowViewProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
static WINDOW_VIEW_CONTROLS windowControls;
static MENU menu;
static ARGS args;

static HWND parent;

UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
initalizeWindowView(hDlg, &menu, &settings, &running, &windowControls, &args);

parent = GetParent(GetParent(GetParent(hDlg)));
args.hWnd = parent;
return (INT_PTR)TRUE;

case WM_COMMAND:
Expand Down
Binary file modified dispLib/include/common.h
Binary file not shown.
5 changes: 5 additions & 0 deletions dispLib/src/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,18 @@ int CALLBACK cursorLock(void* arguments)
if (settings->fullScreen)
enableFullScreen(selectedWindow, &previousRect);

if (settings->minimize)
ShowWindow(args->hWnd, SW_MINIMIZE);

if (settings->foreground)
{
SetForegroundWindow(selectedWindow.hWnd);
SetActiveWindow(selectedWindow.hWnd);
}




if (checkResizeStyle(selectedWindow.hWnd))
{
// TODO: might want to get error message here and check if elevated permissions are required
Expand Down

0 comments on commit e583d63

Please sign in to comment.