diff options
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/accessible/iaccessible2.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qplatformfunctions_wince.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index 9a17f807a9..082ddf625a 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -502,13 +502,11 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_indexInParent(long *indexIn if (!indexInParent) return E_INVALIDARG; QAccessibleInterface *par = accessible->parent(); - if (!par) { - *indexInParent = -1; + *indexInParent = par ? par->indexOfChild(accessible) : -1; + if (*indexInParent < 0) { + qCWarning(lcQpaAccessibility) << "index in parent invalid:" << accessible << "parent:" << par; return S_FALSE; } - int indexOfChild = par->indexOfChild(accessible); - Q_ASSERT(indexOfChild >= 0); - *indexInParent = indexOfChild; return S_OK; } diff --git a/src/plugins/platforms/windows/qplatformfunctions_wince.h b/src/plugins/platforms/windows/qplatformfunctions_wince.h index 921e64d64c..47b03b29cc 100644 --- a/src/plugins/platforms/windows/qplatformfunctions_wince.h +++ b/src/plugins/platforms/windows/qplatformfunctions_wince.h @@ -86,8 +86,10 @@ #define HWND_MESSAGE 0 #endif +// Real Value would be 0x40000000, but if we pass this to Windows Embedded Compact +// he blits it wrongly, so lets not do any harm and define it to 0 #ifndef CAPTUREBLT -#define CAPTUREBLT (DWORD)0x40000000 +#define CAPTUREBLT (DWORD)0x0 #endif #define SW_SHOWMINIMIZED SW_MINIMIZE |