[PATCH] winemac: Fix macdrv_WindowPosChanged behavior when SWP_HIDEWINDOW flag is used.

Ken Thomases ken at codeweavers.com
Wed Mar 11 14:23:47 CDT 2020


On Mar 11, 2020, at 10:30 AM, Piotr Caban <piotr at codeweavers.com> wrote:
> 
> On 3/11/20 4:28 PM, Piotr Caban wrote:
>> On 3/11/20 4:16 PM, Ken Thomases wrote:
>>> Hmm.  This means that when a window is hidden, we don't release its surface, which can be a large allocation.
>>> 
>>> I think the right fix would be something like changing get_mac_surface() in surface.c to check surface->funcs against &macdrv_surface_funcs and returning NULL if it's not one of ours.  Then, check the return in the appropriate places (in a number of places where it's called we know for sure that it's one of ours).
>> Isn't it better to never store dummy_surface in data->surface? How about doing something like:
>> if (!(swp_flags & SWP_HIDEWINDOW)) surface = NULL;
> if (swp_flags & SWP_HIDEWINDOW) surface = NULL;

Perhaps, although I'd want to base the decision on the funcs pointer, not the swp_flags.  Of course, you've already sent an implementation of my suggestion and that seems fine, too.

-Ken




More information about the wine-devel mailing list