New stack property ignoresMouseEvents
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
New stack property ignoresMouseEvents
Hi
One of the windows in Clarify (snapshot countdown) needs to be transparent to mouse events so Trevor has asked me to look into implementing that. On OS X an external solution is working by setting a property of the ignoresMouseEvents of the NSWindow however on Windows I need to modify the WindowProc function to handle WM_NCHITTEST and return HTTRANSPARENT which would need to be an engine change... so can I have some feedback on an ignoresMouseEvents stack property?
Cheers
Monte
One of the windows in Clarify (snapshot countdown) needs to be transparent to mouse events so Trevor has asked me to look into implementing that. On OS X an external solution is working by setting a property of the ignoresMouseEvents of the NSWindow however on Windows I need to modify the WindowProc function to handle WM_NCHITTEST and return HTTRANSPARENT which would need to be an engine change... so can I have some feedback on an ignoresMouseEvents stack property?
Cheers
Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
@monte: Sounds reasonable to me - ignoreMouseEvents seems a perfectly reasonable name for it, unless anyone can think of a better one
Re: New stack property ignoresMouseEvents
I'm looking at this today then. What are your thoughts on the persistence of this property?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
Looking at the options for persistence and extended state bit 17 looks like an option. And I'm guessing it should be implemented like modified mark and go via platform window which I think is new since I looked at the engine... I'm forking from develop as my target for release is the 6.7 cycle.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
Oh... looks like the platform stuff is only implemented for Mac and I'll need to do different things for other platforms...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
Here's the branch for anyone interested to follow/comment: https://github.com/montegoulding/liveco ... ouseEvents
Still to do is test on Windows and document the new property.
Still to do is test on Windows and document the new property.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
Slightly different behavior on Windows where the mouseEvents can only be picked up by underlying windows of the same thread rather than any app. Trying to see if there's any options to make the behavior the same.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
I seem to have found a solution by setting the extended style to WS_EX_TRANSPARENT
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
I've just sent in the pull request. If it could make the next 6.7 dp I'd really appreciate it.
https://github.com/runrev/livecode/pull/814
https://github.com/runrev/livecode/pull/814
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
@monte: Good work - I've merged the pull request into develop (via feature-ignore_mouse_events in the RunRev repo) and it will just make 6.7-dp-5. I'm going to ask @runrevfraser to take a look at the branch to see if he can add Linux support (assuming it supports such a mode) if that's okay - might as well see if we can get platform uniformity.
Re: New stack property ignoresMouseEvents
I spent a few minutes googling but nothing jumped out at me so if Fraser can come up with something that would be nice
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: New stack property ignoresMouseEvents
I think it should be do-able for Linux.
I'm nearing the completion of porting the Linux windowing code (everything in MCScreenDC, essentially) to use GDK instead of Xlib and have discovered that GDK allows you to set not only a window shape for transparency but also one for input filtering, and the two appear to be settable independently. In other words, it should be possible to specify an empty input mask in order to have all pointer events ignored.
Of course, I've not tried this yet. It will probably turn out not to work how we expect but we can always hope
I'm nearing the completion of porting the Linux windowing code (everything in MCScreenDC, essentially) to use GDK instead of Xlib and have discovered that GDK allows you to set not only a window shape for transparency but also one for input filtering, and the two appear to be settable independently. In other words, it should be possible to specify an empty input mask in order to have all pointer events ignored.
Of course, I've not tried this yet. It will probably turn out not to work how we expect but we can always hope