transparent window in osx with events passthrough

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
gopisk
In need of some credit
In need of some credit
Posts: 5
Joined: Tue Nov 27, 2012 12:06 pm

transparent window in osx with events passthrough

Post by gopisk » Tue Nov 27, 2012 12:11 pm

Hi,

How to create a transparent window in OSX that passes the mouse events to underlying window?

I had seen the solution for windows in this forum
http://forums.wxwidgets.org/viewtopic.php?f=1&t=25785

But not able to get the same behavior in OSX.

Thanks,
Gopi

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Re: transparent window in osx with events passthrough

Post by protocol » Fri Nov 30, 2012 3:37 am

You may have to go down to a Cocoa or Carbon level (under wxWidgets).

Do you mean transparent as in a custom shaped window? Or a window that is semi-transparent?
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

gopisk
In need of some credit
In need of some credit
Posts: 5
Joined: Tue Nov 27, 2012 12:06 pm

Re: transparent window in osx with events passthrough

Post by gopisk » Fri Nov 30, 2012 4:11 pm

Protocol,

Thanks for your suggestion. I am just using a dialog which is semi-transparent. That i am able to get it in mac by setting window SetTransparent(100);
I want that dialog should not catch the mouse events and events has to go to underneath windows.

thanks,
Gopi

gopisk
In need of some credit
In need of some credit
Posts: 5
Joined: Tue Nov 27, 2012 12:06 pm

Re: transparent window in osx with events passthrough

Post by gopisk » Mon Dec 03, 2012 1:55 pm

Hi,

Following changes solved the problem

void wxTopLevelWindowMac::DoMacCreateRealWindow()
{
---
if ( HasFlag(wxTRANSPARENT_WINDOW))
{
attr |= kWindowIgnoreClicksAttribute;
}

------------
}
toplevel.cpp

Thanks,
Gopi

Post Reply