Add function to find a window in the app server by the client looper port id. Need this for the stacking api e.g. to stack window x on window y.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38168 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2010-08-17 06:23:06 +00:00
parent 38d80987f3
commit b8a44a250e
2 changed files with 14 additions and 0 deletions

View File

@ -2484,6 +2484,18 @@ Desktop::AllWindows()
}
Window*
Desktop::WindowForClientLooperPort(port_id port)
{
for (Window* window = fAllWindows.FirstWindow(); window != NULL;
window = window->NextWindow(kAllWindowList)) {
if (window->ServerWindow()->ClientLooperPort() == port)
return window;
}
return NULL;
}
WindowList&
Desktop::_Windows(int32 index)
{

View File

@ -260,6 +260,8 @@ public:
WindowList& CurrentWindows();
WindowList& AllWindows();
Window* WindowForClientLooperPort(port_id port);
private:
WindowList& _Windows(int32 index);