Re: client side windows borkage on Gdk/Quartz



On Sun, Apr 25, 2010 at 5:23 PM, Paul Davis <paul linuxaudiosystems com> wrote:
> On Sun, Apr 25, 2010 at 5:37 AM, Kristian Rietveld <kris gtk org> wrote:
>> As far as I understand, there's only that top level NSView in GDK
>> applications now in the case of client side windows, that does not
>> contain any other NSViews.  So for each NSWindow there will only be a
>> single NSView for which the drawRect: method will be called.
>
> Looking at the code, I don't see this at all. Every creation of a GdkWindow
> is accompanied by the creation of a GdkQuartzView which inherits from
> NSView. This view is added to the parent view. So, I don't think that its
> the case that the client-side windows work has really propagated into the
> quartz backend at all. Thus, we have both heirarchies still inplace. I

The distinction between creating a client side or native window is
*not* made in _gdk_window_impl_new() in gdkwindow-quartz.c; this
function is called to create native windows for Quartz and thus always
creates a GdkQuartzView.  You want to look at gdk_window_new() in
gdkwindow.c as well and you will see that _gdk_window_impl_new() is
only called if native == TRUE.

Before I sent out my reply this morning, I had empirically verified
that only a single GdkQuartzView is created per NSWindow.  ObjectAlloc
agreed with me as well.

> therefore think, from a code reading at least, that this claim:
>>
>> That is because the NSView will be the content view, so it corresponds
>> to the toplevel GdkWindow.  Again note that drawRect will only be
>> called once per NSWindow (since there is only one NSView per
>> NSWindow).
>
> is false.

So this claim has not been proved false.


regards,

-kris.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]