Make sure custom frame windows paint as active when they're activated.
Make sure custom frame windows paint as active when they're activated.

Rationale for fix:

The code in NativeWidgetWin::OnNCActivate schedules a paint for the entire non-client view if the window is visible because its activation state has changed and it'll doubtless require a repaint.

A subsequent hack introduced by me to recover from the "other windows bleed through the UI" immediately forces a redraw, before the default WM_NCACTIVATE handler is called for the window.

It seems that the window's active state is only set by or after the default WM_NCACTIVATE handler, so this hack redraw causes the window to just repaint itself as inactive since the state hasn't updated yet (and my earlier refactorings have made the frame ask Windows if the window is active rather than relying on custom cached state).

So, to address this I moved the hack redraw from NativeWidgetWin::OnNCActivate to NativeWidgetWin::OnActivate, after the state and redraws should have happened. This corrects the issue for me.

http://crbug.com/85791
TEST=see bug
Review URL: http://codereview.chromium.org/7165003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@89076 0039d316-1c4b-4281-b951-d872f2087c98

krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,robclark/chromium,dednal/chromium.src,patrickm/chromium.src,littlstar/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,anirudhSK/chromium,ltilve/chromium,pozdnyakov/chromium-crosswalk,rogerwang/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,ltilve/chromium,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,keishi/chromium,hujiajie/pa-chromium,ltilve/chromium,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,anirudhSK/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,jaruba/chromium.src,Just-D/chromium-1,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,robclark/chromium,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,ltilve/chromium,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,keishi/chromium,robclark/chromium,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,rogerwang/chromium,ChromiumWebApps/chromium,patrickm/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,Chilledheart/chromium,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,rogerwang/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,M4sse/chromium.src,dushu1203/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,Chilledheart/chromium,ChromiumWebApps/chromium,patrickm/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,ltilve/chromium,Jonekee/chromium.src,keishi/chromium,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,dednal/chromium.src,keishi/chromium,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,ChromiumWebApps/chromium,rogerwang/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,keishi/chromium,robclark/chromium,robclark/chromium,anirudhSK/chromium,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,keishi/chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,littlstar/chromium.src,anirudhSK/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,robclark/chromium,dushu1203/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,markYoungH/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,hujiajie/pa-chromium,Just-D/chromium-1,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,keishi/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,keishi/chromium,littlstar/chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,keishi/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,zcbenz/cefode-chromium,rogerwang/chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,littlstar/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,robclark/chromium,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,rogerwang/chromium,dednal/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,keishi/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,anirudhSK/chromium,ltilve/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,robclark/chromium,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk