[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Listbox: Infinite loop
From:       Dirk Thierbach <thierbach () mathematik ! tu-darmstadt ! de>
Date:       2000-07-31 8:00:35
[Download RAW message or body]

gerard patel wrote:

> IMO the problem is that the app is trying to set the dimensions of
> the listbox to fit the number of entries it wants. Unfortunately, there
> is a little change somewhere and the list gets a bit smaller than
> necessary to fit an integral number of items, Wine (the listbox code)
> recalculate the best size to fit to the nearest lower number of items,
> the app is not happy, etc...

Would it make sense to add an internal flag to the listbox that
would prevent it from resizing itself on the second resize attempt?
Something like: Store original size before it resizes itself, and
if the app tries to set the original size again, just accept it.

I don't think Wine will always be able to allow the same window sizes
as the original, especially if one uses X fonts instead of the Windows
fonts etc. And if apps insist on a certain size, there is not a lot
one can do.

It's a kludge, but at least it would avoid the infinite loop. And 
it could print a warning, so users would now there is a bug somewhere
else that needs fixing.

> If I *assume* that the offset is done in the WM_NCCALCSIZE
> event, it works :

Thanks. Since you know a lot more about these things than I do, I
think you should submit the patch when (and if) you are convinced it
is the right thing to do.

- Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic