Comments (16)
I am trying to get a fix to work, but as for now you have to bring up any app after clicking show desktop. After that, all fences will reappear.
from nofences.
@Twometer I currently don't have time. But I'll try to look at it on the weekend.
from nofences.
I don't think it is possible with WinForms to prevent Show Desktop from hiding the fences, as it does not minimize the window but bring the desktop to foreground.
However, once you reopen any window, they should reappear.
from nofences.
Understandable. Would you recommend any workaround?
from nofences.
I think this should Help: https://stackoverflow.com/questions/938924/get-the-minimize-box-click-of-a-wpf-window/938956#938956
from nofences.
@Lucarnosky Thanks for the suggestion but unfortunately, that doesn't work. The app uses WinForms, but I think there is also a way to get the Minimize Box Event.
The main problem is that a (winforms?) app does not get any event for when the show desktop button is clicked, as it does not minimize the windows...
from nofences.
Hello! I've just found and started using NoFences, and it's just great!
I do think this issue is solved by now, isn't it?
Well, if it isn't, I've had the "Win+D minimization issue" before on personal use projects, and the snippet found on this Stack Overflow question did the trick: https://stackoverflow.com/questions/35045060/how-to-keep-window-visible-at-all-times-but-not-force-it-to-be-on-top
I hope it helps, please take a look!
Thanks!
(I might clone NoFences and try to make it un-minimizable myself, later today or this week... I'll turn anything I do with it into one or more PRs)
from nofences.
Hi! Thank you for the suggestion.
Unfortunately, the issue still isn't fixed, as I haven't found a way to prevent the show desktop buttons from Windows
I have actually tried implementing a similar solution in Win32/DesktopUtil.cs
which however did not prevent Win+D. I've just tried the code from StackOverflow as well, but for me it still disappears when pressing Windows+D
If you get it to work, I would greatly appreciate the PR
from nofences.
I'm on lunch time, but I've already found the solution I've used on my repositories (though I have no time right now to try it on NoFences).
This is the piece of code that did the trick:
private const Int32 GWL_STYLE = -16;
private const Int32 WS_MAXIMIZEBOX = 0x00010000;
private const Int32 WS_MINIMIZEBOX = 0x00020000;
[DllImport("User32.dll", EntryPoint = "GetWindowLong")]
private extern static Int32 GetWindowLongPtr(IntPtr hWnd, Int32 nIndex);
[DllImport("User32.dll", EntryPoint = "SetWindowLong")]
private extern static Int32 SetWindowLongPtr(IntPtr hWnd, Int32 nIndex, Int32 dwNewLong);
// ...
m_hwnd = new WindowInteropHelper(this).Handle;
Int32 windowStyle = GetWindowLongPtr(m_hwnd, GWL_STYLE);
SetWindowLongPtr(m_hwnd, GWL_STYLE, windowStyle & ~WS_MAXIMIZEBOX & ~WS_MINIMIZEBOX);
You may try it right away if you have time before I do!
I'm looking forward to contribute on this project, thinking of a lot of features... That's why I checked the "Issues" tab lol. It can turn out great if I manage to spend some weekend time on it :)
from nofences.
Even with this code in place, for me it still disappears with Win+D... Maybe you have more luck than I do :-)
Looking forward to your contributions, sounds great!
from nofences.
woah... woah... woah
how to I enable it even? I'm new to Github
from nofences.
@MahmoudKhaiti what do you mean by enabling it?
from nofences.
Hi. Just noticed this repo while finding free alternative.
I've been already experimenting with this kind of issues.
I already have some code ready for this so I might contribute by fixing this stuff.
But it's really dirty solution.
You can simply set the window to normalized and even set position of the window to the most bottom (relative to other windows) every time application gets message (event) from windows.
But you need to import C libs tho.
I didn't check it, but code from Leonelsr might be way to go.
BTW: I just made my account. I previously deleted my GH account when I moved all my stuff to NAS...
from nofences.
@GordnCZ Sounds nice, I'd be glad if you find a way to fix it. I tried leonelsr's code already when he posted it, but for me it did not work.
from nofences.
@Twometer Hi. Sorry for taking so long. Didn't have time at all.
Anyway I found a solution.
It's pretty easy. All you need to do is to replace line 46 in DesktopUtil.cs with this:
SetWindowLongPtr(handle, GWL_HWNDPARENT, nWinHandle.ToInt32());
And uncomment line 60 in FencesWindow.cs.
Even background blur works
from nofences.
Thanks everyone for the suggestions! Fixed in #14
from nofences.
Related Issues (20)
- Create docs
- THANK YOU FOR THIS!!!! & Request: double-click to hide/reveal fences HOT 2
- Did I find a glitch? Or is this behavior expected? HOT 6
- Suggestion: Right-Click title bar to also see NoFences menu HOT 1
- Request: Set Fence Opacity HOT 1
- Request: Set icon size in the Fences HOT 1
- Request: Stay on Top when Minimize to Desktop HOT 1
- Scaling for High DPI HOT 12
- How do I compile the program? HOT 2
- Systray with option to quit program? HOT 1
- Reorder fence items once they are in a fence
- Animation for minified fences
- Add a folder as a fence HOT 1
- Modern Windows 11 Context Menu HOT 1
- Additional Install via the Windows Store
- Add about window with some hints
- Color settings
- move issues HOT 1
- International support HOT 3
- Show extensions file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nofences.