Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 1746013002: Hide/show widget on Windows screen lock/unlock Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/win/hwnd_message_handler_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 1b693f8718e30fd682d56cb31f3612d1d025370c..8d8d87d22e0f74140c4ef66571c690e027d67d32 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -2301,8 +2301,14 @@ void HWNDMessageHandler::OnWindowPosChanged(WINDOWPOS* window_pos) {
void HWNDMessageHandler::OnSessionChange(WPARAM status_code) {
// Direct3D presents are ignored while the screen is locked, so force the
// window to be redrawn on unlock.
- if (status_code == WTS_SESSION_UNLOCK)
+ if (status_code == WTS_SESSION_UNLOCK) {
ForceRedrawWindow(10);
+ if (IsVisible())
+ delegate_->HandleSoftVisibilityChanged(true);
+ } else if (status_code == WTS_SESSION_LOCK) {
+ if (IsVisible())
+ delegate_->HandleSoftVisibilityChanged(false);
+ }
}
void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) {
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/win/hwnd_message_handler_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698