Remove CanActivate() hack from screen capture notification UI
ScreenCaptureNotificationUIViews overrides CanActivate() so that the widget is not activatable when it is hidden, and activable when visible. This was a hack to fix the a display bug on Windows that lacks an explanation on why it worked. See r256851. This hack is causing issue on Mac that the button on the notification widget will initially show in active style and change to inactive style after a mouse hover. Removing the hack solves the cosmetic issue on Mac. Manually tested on Windows and didn't observe any issue in hiding/restoring the widget as described in the comment and in r256851. Details on why the hack caused the cosmetic issue: 1. CanActivate() is false during widget initialization. This will make native widget inactive but visual style active. 2. CanActivate() becomes true after initialization. When a mouse hover triggers repaint of the button in the widget, widget->IsActive() returns false because the native widget is inactive. Thus on Mac, the button is rendered in inactive style. Bug: 1156580 Change-Id: Ic1e4d4bdbe3f29e6f65123880e5e9d373edb189b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596099Reviewed-by:Peter Kasting <pkasting@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#838475}
Showing
Please register or sign in to comment