Bug 470487 - Touchup patch for wince (lacking GetAncestor).
authorJim Mathies <jmathies@mozilla.com>
Sun, 19 Apr 2009 14:39:37 -0500
changeset 27506 5459d709f71cf442d836da8a25a2efcf048fe8ad
parent 27505 a7b2a881595a977a68ae184a8503bdb7503d12ae
child 27507 9d055324a80c1eaf33a393f86957608d9e0aa7db
push id6583
push userjmathies@mozilla.com
push dateSun, 19 Apr 2009 19:40:12 +0000
treeherdermozilla-central@5459d709f71c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs470487
milestone1.9.2a1pre
Bug 470487 - Touchup patch for wince (lacking GetAncestor).
widget/src/windows/nsWindow.cpp
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -1509,21 +1509,25 @@ nsWindow* nsWindow::GetParentWindow(PRBo
     return nsnull;
 
 
   // aIncludeOwner set to true implies walking the parent chain to retrieve the
   // root owner. aIncludeOwner set to false implies the search will stop at the
   // true parent (default).
   nsWindow* widget = nsnull;
   if (mWnd) {
+#ifdef WINCE
+    HWND parent = ::GetParent(mWnd);
+#else
     HWND parent = nsnull;
     if (aIncludeOwner)
       parent = ::GetParent(mWnd);
     else
       parent = ::GetAncestor(mWnd, GA_PARENT);
+#endif
     if (parent) {
       widget = GetNSWindowPtr(parent);
       if (widget) {
         // If the widget is in the process of being destroyed then
         // do NOT return it
         if (widget->mIsDestroying) {
           widget = nsnull;
         }