On Tue, Aug 03, 2004 at 01:42:28AM +0200, Filip Navara wrote:
Unfortunetly I can't explain it, because I don't understand it myself. I
In which case I must object to the patch :( It seems we're just hiding a problem in a very convoluted way, don't you think?
have inserted debug messages on all the places where the listview display mode can be changed and none of them appeared. After going once more through the whole code I found this. Obviously it seemed redundant and the only reason for doing that was workarounding problems with changed WS_VSCROLL and WS_HSCROLL styles (which correctly don't recieve WM_STYLECHANGED notifications from the scrolling code). So I tried removing it and ... whoa ... to my surprise it started to work.
The problem is that WM_STYLECHANGED is sometimes sent, sometimes not, and it seems so much easier to just update it every time we come in so we can be sure we're using the latest value, as we should. It's redundant, I agree, but it's neglijable in terms of performance so I've put it in due to it's simplicity. This way the dwStyle has a very simple to understand semantics. In fact, I've meant to remove it eventually, just like you did, but only as an optimization. However, doing so to fix a bug in a way that we don't understand worries me greatly. I'd rather keep it in, and fix the problem.