Sorry, the previous patch for WindowAt() by Váradi Zsolt Gyula was broken as well.
This change now actually fixes its logic; thanks for the hint, though :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21777 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1461,8 +1461,8 @@ BApplication::_WindowAt(uint32 index, bool includeMenus) const
|
|||||||
uint32 count = gLooperList.CountLoopers();
|
uint32 count = gLooperList.CountLoopers();
|
||||||
for (uint32 i = 0; i < count && index < count; i++) {
|
for (uint32 i = 0; i < count && index < count; i++) {
|
||||||
BWindow* window = dynamic_cast<BWindow*>(gLooperList.LooperAt(i));
|
BWindow* window = dynamic_cast<BWindow*>(gLooperList.LooperAt(i));
|
||||||
if (window == NULL && (!includeMenus
|
if (window == NULL || (!includeMenus
|
||||||
|| dynamic_cast<BMenuWindow *>(window) == NULL)) {
|
&& dynamic_cast<BMenuWindow *>(window) != NULL)) {
|
||||||
index++;
|
index++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user