Skip to content

Commit 65a0d85

Browse files
authored
Merge pull request #14 from Lucarnosky/master
Fix disappearing when clicking show desktop button.
2 parents 922c2e9 + 43a73fb commit 65a0d85

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

NoFences/FenceWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public FenceWindow(FenceInfo fenceInfo)
5757
DropShadow.ApplyShadows(this);
5858
BlurUtil.EnableBlur(Handle);
5959
WindowUtil.HideFromAltTab(Handle);
60-
//DesktopUtil.GlueToDesktop(Handle);
60+
DesktopUtil.GlueToDesktop(Handle);
6161
//DesktopUtil.PreventMinimize(Handle);
6262
this.titleHeight = fenceInfo.TitleHeight;
6363
this.MouseWheel += FenceWindow_MouseWheel;

NoFences/Win32/DesktopUtil.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public static void PreventMinimize(IntPtr handle)
4242
public static void GlueToDesktop(IntPtr handle)
4343
{
4444
IntPtr nWinHandle = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null);
45-
nWinHandle = FindWindowEx(nWinHandle, IntPtr.Zero, "SHELLDLL_DefView", null);
46-
SetParent(handle, nWinHandle);
45+
SetWindowLongPtr(handle, GWL_HWNDPARENT, nWinHandle.ToInt32());
46+
4747
}
4848
}
49-
}
49+
}

0 commit comments

Comments
 (0)