Re: Runloops and Window Dragging
Re: Runloops and Window Dragging
- Subject: Re: Runloops and Window Dragging
- From: Uli Kusterer <email@hidden>
- Date: Fri, 04 Oct 2013 00:07:13 +0200
On 03 Oct 2013, at 02:47, Caylan Larson <email@hidden> wrote:
> On Oct 2, 2013, at 5:06 PM, Jens Alfke <email@hidden> wrote:
>
>>> I am using CGWindowListCreateImage to fetch an image of the windows behind my app. This works beautifully and is OK for my needs.
>>
>> I assume you’re doing this to apply some kind of fancy effects to the image, so your window acts like a filter?
>
> Correct. The images are previews of renderings. Instead what I've done is create a very large child window with a hole punched for my window. When the window settles down I render the window with the filter. There doesn't seem to be a better way. It works well enough and satisfies my UI needs.
So you’re only applying this effect to the other window, or also to arbitrary other stuff on the screen? I vaguely remember there being a way to apply a CIFilter behind a window (Essentially it’s what e.g. menus and sheets use to blur the drawings that show through their opaque areas).
I remember seeing someone using that, though I’m not sure whether it was private SPI or documented API. Anyway, you might be able to investigate that approach if it makes sense for you. Also, do you really need a separate window? Otherwise, using a CALayer and its backgroundFilters property or so.
Would a CIFilter work for your use case?
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden