Reply
Thread Tools Display Modes
Unread 01-21-14, 09:45 AM   #1
Lombra
A Cobalt Mageweaver
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 216
Hide frame on escape but not on control lost

I use UISpecialFrames to make my frames hide on escape. (and some other actions) I like this feature. What I don't like is how these frames also gets hidden on PLAYER_CONTROL_LOST. Normally this is annoying. When it closes my whisper frame while I'm in the middle of typing a message, which then gets lost, it's completely retarded. Is there some neat way to fix this?

Looking at the code, I could probably do without it closing on any of the non hardware driven events, such as player dead, entering world.

Actually I might just unregister the event on the UIParent. That won't cause taint, will it? All it does apart from closing all windows is setting UIParent.isOutOfControl = 1, which doesn't seem to be used anywhere.

Would still like to work around the other events if possible. Entering world I could probably do something with leaving world. Not sure about player dead. There's no such thing as getCurrentEvent() is there? How about get current hardware event? I know about GetMouseButtonClicked, but that won't cover escape, obviously.
__________________
Grab your sword and fight the Horde!
Lombra is offline   Reply With Quote
Unread 01-21-14, 10:18 AM   #2
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 552
Unregistering the event won't cause taint. As far as I know registering an event won't either, so if you only want to temporarily disable it while the edit box is shown you should be able to do that.
semlar is online now   Reply With Quote
Unread 01-21-14, 10:38 AM   #3
Duugu
Premium Member
 
Duugu's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 674
Code:
<Frame name="UIParent" setAllPoints="true" protected="true" frameStrata="MEDIUM">
I'm not very familar with this, but doesn't protected="true" basically mean that calling UIParent:UnregisterEvent() out of tainted code will cause taint?
Duugu is offline   Reply With Quote
Unread 01-21-14, 07:22 PM   #4
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,282
Originally Posted by Duugu View Post
I'm not very familar with this, but doesn't protected="true" basically mean that calling UIParent:UnregisterEvent() out of tainted code will cause taint?
No; unregistering an event on a secure frame does not taint the frame. Every unitframe addon in existence unregistered UNIT_NAME_UPDATE on their secure group headers before Blizzard broke automated title-swapping, and they still unregister events and do other stuff to the Blizzard uniframes to hide them, all of which can be un-done by re-registering the events and the Blizzard frames will return to working normally without any taint complaints.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » Hide frame on escape but not on control lost

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off