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

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

Issue 14312007: Don't release capture when this window doesn't already have it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | 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 73b9f65c438524513bcea21ee478b0c1cc70de2f..7dbbf718f887cba49c207e49ea4c03d51545158e 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -720,7 +720,8 @@ void HWNDMessageHandler::SetCapture() {
}
void HWNDMessageHandler::ReleaseCapture() {
- ::ReleaseCapture();
+ if (HasCapture())
+ ::ReleaseCapture();
}
bool HWNDMessageHandler::HasCapture() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698