Index: services/ui/ws/window_tree.cc |
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc |
index 9b6459540c5dd71d5ca6405db13a846b15f02e70..4f6984fdeea4ba94b8a810c869ea0aedc89f2f5a 100644 |
--- a/services/ui/ws/window_tree.cc |
+++ b/services/ui/ws/window_tree.cc |
@@ -307,6 +307,9 @@ bool WindowTree::AddTransientWindow(const ClientWindowId& window_id, |
bool WindowTree::DeleteWindow(const ClientWindowId& window_id) { |
ServerWindow* window = GetWindowByClientId(window_id); |
+ DVLOG(2) << "removing window from parent client=" << id_ |
msw
2016/11/17 21:26:14
q: use level 3 to avoid level-2 spam for expected
sky
2016/11/17 22:25:54
Done.
|
+ << " local window_id= " << window_id.id << " glocal window_id=" |
msw
2016/11/17 21:26:15
q: glocal? ditto below
sky
2016/11/17 22:25:54
Done.
|
+ << (window ? WindowIdToTransportId(window->id()) : 0); |
if (!window) |
return false; |
@@ -1195,8 +1198,16 @@ void WindowTree::AddWindow(uint32_t change_id, Id parent_id, Id child_id) { |
void WindowTree::RemoveWindowFromParent(uint32_t change_id, Id window_id) { |
bool success = false; |
ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id)); |
- if (window && window->parent() && |
- access_policy_->CanRemoveWindowFromParent(window)) { |
+ DVLOG(2) << "removing window from parent client=" << id_ |
+ << " local window_id= " << window_id << " glocal window_id=" |
+ << (window ? WindowIdToTransportId(window->id()) : 0); |
+ if (!window) { |
+ DVLOG(1) << "remove failing, invalid window id=" << change_id; |
+ } else if (!window->parent()) { |
+ DVLOG(1) << "remove failing, no parent id=" << change_id; |
+ } else if (access_policy_->CanRemoveWindowFromParent(window)) { |
+ DVLOG(1) << "remove failing, access policy disallowed id=" << change_id; |
+ } else { |
success = true; |
Operation op(this, window_server_, |
OperationType::REMOVE_WINDOW_FROM_PARENT); |