Undead tooltips on WM_LBUTTONDOWN to splitter panel

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Undead tooltips on WM_LBUTTONDOWN to splitter panel

Post by *MVV »

It seems to be a some kind of bug. It is quite easy to reproduce: you need to send message WM_LBUTTONDOWN with lParam=1 and wParam=0 to splitter panel. When TC receives the message it allows to move splitter just by moving mouse (it is quite useful :)) and after a mouseclick new splitter position is accepted. However tooltip window with percent is not destroyed then. So after sending multiple WM_LBUTTONDOWN messages there are multiple tooltips on a screen.

Christian, maybe you can investigate such a strange thing?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Can you send WM_LBUTTONUP message when you are done moving? TC removes the splitter tip window in reaction to that message. I will add some code to re-use the splitter tip object.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

The problem is that my tool doesn't know when user does the click, it just sends WM_LBUTTONDOWN. TC should receive a pair WM_LBUTTONDOWN/WM_LBUTTONUP when user does the click. So it receives WM_LBUTTONUP... Why doesn't it work?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe you send WM_LBUTTONUP to the wrong window? You need to send it to the split panel control.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I doesn't send WM_LBUTTONUP at all, I only send WM_LBUTTONDOWN directly to splitter's TPanel (3px width). But when user clicks to apply separator position change, splitter should receive click (i.e. button down and then up) because it is under cursor at that moment.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Apparenlty TC is not getting the mouse up message, because TC is removing the tip in that message handler.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Christian, please test it yourself, here the sample application that sends WM_LBUTTONDOWN message to splitter:

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="splitter_move.7z"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="splitter_move.7z"

N3q8ryccAAOfauYB+AEAAAAAAABtAAAAAAAAAOgTO5sAJpaOcAAX9+wFu+r0/5QBL0TuTr0JNTj9
wXIs+2C8FA6O7vPnB3UmwHoI1yz34WmVTTWglcU2hJnQdzChVQ5ISHLBgmBQy3zuSK8o4CGAm7w+
2OfhNtvRMJ52gSS8u5wA6P6hB6/yoDCYXXh2ao+oxhXSi0cCyHhqX16SyT4x+Mni1xNWMoEv9zXA
G8/ZkHAwp2J67CuJuR/tQis24VAAF0gB+AgsO4zOLiMJCq9eChigUtTgNgQj/g01Uz5Dssru2xh5
Lif3UHZ+2n1gCpSi1508OHBJxGKpY1EfJlu3v4xQTBblTFMnme5OBCl3c0Y7/i2DGqh4FU2bjfkV
w+7XEIPdR9CY9d6LgHVR2M8PjnTNWSdWyFq21uRtAFSePNRF56Pbqp2ucM1vNeiYhDqlsFWkjija
bdePECEUYLE+Y/Q6DiD7VdEc7vwWrReedduw56lxQAG6+55WvaYHrR8kP5mJVbsJMcs9UXx9IEKT
fv7g/W7pXOgr6mo+c28GgkGrvUbLaNTXTJlbHUVX/gzUXUkV12ObS++c0qoXtG7/YG5y9yUj80p6
TerIoqdjUCx/fEOp3xHtl2LIbVsPEd0tCgVoxu0U+eEvol9oDjQWBsdq+Rlw3ha05/wXv2FdmTX0
Do5fa/jGSqiunAKOAMJwYrBFnS2t8MsBBAYAAQmB+AAHCwEAAiMDAQEFXQAAAQAEAwMBAwEADIQA
hAAACAoBpF+CRQAABQERJQBzAHAAbABpAHQAdABlAHIAXwBtAG8AdgBlAC4AZQB4AGUAAAAUCgEA
tOFZJs4CzQEVBgEAIAgAAAAA

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I see the problem now - TC gets a WM_ACTIVATEAPP message, and sets flag MouseDownOnCenterPanel to false. Therefore the mouse up message is not processed. I will remove the tip window when receiving WM_ACTIVATEAPP to fix it.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Great to hear that, waiting for the next beta. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, please test it now with beta 23!
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks, works fine! :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply