question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimize Button Click Not Detected

See original GitHub issue

https://github.com/dockpanelsuite/dockpanelsuite/blob/bb1246b6950b9a0c8ac24c3c22a1bc77af4a49e8/WinFormsUI/Docking/FloatWindow.cs#L197

On some setups, clicking the in lower left corner of the minimize button on the title bar will not be detected correctly. The result from the hit test will come back with a 2 indicating the title bar rather than an 8 for the minimize button. For the WM_NCLBUTTONDOWN message, the WParam included in the Message passed to WndProc should be used to determine where the click occurred. https://msdn.microsoft.com/en-us/library/windows/desktop/ms645620(v=vs.85).aspx

This line should be removed and the relevant part of the if statement on the next line should be changed to (uint)m.WParam == 2

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
DanCarterGMSLcommented, Nov 15, 2018

I think the better fix would be the one suggested by @TheBobman03. This would mean the dragging code works as it should too.

1reaction
DanCarterGMSLcommented, Nov 15, 2018

The suggested solution by @mapper55 will minimize the window as soon as the left mouse button is pressed down. This is not how Windows usually works; normally it’s only on mouseup that the action is taken.

That said, if you change it to look at WM_NCLBUTTONUP instead, then clicking in the red region initiates a drag operation, whereas minimizing on mousedown doesn’t give time for that. The proper fix would be to use the correct hit test value for the drag operation too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIX: Minimize/Maximize/Close Buttons Missing [Chrome, ...
Press Ctrl + Shift + Esc to start Task Manager. · When Task Manager opens, locate Desktop Windows Manager, right-click it, and choose...
Read more >
Restore, Minimize, Maximize, Close buttons not working in ...
Turn off the Tablet Mode. Check in Clean Boot State. Reinstall the program. Run System File Checker. Run DISM. 1] Turn off the...
Read more >
Cannot click taskbar or window minimize, maximize, and ...
1. Hit Ctrl + Alt + Del -> try several times clicing "Cancel" button. The everything back to normal. 2. Hit Win +...
Read more >
minimize button not working : r/pop_os
simple solution for now, right click on title bar and minimize. Edit : Solution, disable pop-shell in extensions https://www.reddit.com/r/ ...
Read more >
[SOLVED] How to detect a click on the minimize button
I suppose is not hard to do, but I'm struggling with this for a long time now :( I use KeyWait, LButton, D...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found