It's possible to change the attributes on the frames, so you could for example only click the frame if you're holding down shift.

Lua Code:

PlayerFrame:SetAttribute('*type1', nil)

PlayerFrame:SetAttribute('shift-type1', 'target')

That doesn't affect the frame's mouse-interactability, though. You still can't click through the frame. All the click attributes do is change what happens when you click on the frame. Using the above code, clicking on the frame without holding Shift would simply create a "dead zone" where clicks did nothing at all.

A better overall solution might be to simply move the frames to some part of the screen you aren't accidentally clicking all the time.

Hmm, this got me thinking... Would this not be possible with a custom state, or are custom states not allowed on unitframes (Is SecureUnitButtonTemplate inheriting attributes/methods of SecureHandlerStateTemplate)?

Hmm, this got me thinking... Would this not be possible with a custom state, or are custom states not allowed on unitframes (Is SecureUnitButtonTemplate inheriting attributes/methods of SecureHandlerStateTemplate)?

If this worked then it would help me with what I'm trying to do. I was just using "PlayerFrame" as an example I really wanted get a code that would make it so that I could click through raid frames during combat unless a modifier is being used like shift,ctrl,alt. Instead of "PlayerFrame" it would be "CompactRaidGroup1Member1" (I would actually have to do it for every raid member up to 10 because I just want it for 10 mans so CompactRaidGroup1Member2, CompactRaidGroup1Member3 etc).

I just tried this and it didn't work for PlayerFrame and I tried in and out of combat.