Lines Matching refs:window

102 	WindowLayer* window;
103 if (!fTracking && fFocusFollowsMouse && (window = WindowAt(where))) {
104 SetFocusWindow(window);
182 WindowLayer* window;
183 if (message->FindPointer("window", (void**)&window) >= B_OK)
184 AddWindow(window);
237 Desktop::AddWindow(WindowLayer* window)
240 if (fWindows.AddItem((void*)window)) {
241 // rebuild the entire screen clipping and draw the new window
245 fBackgroundRegion.Exclude(&window->VisibleRegion());
246 MarkDirty(&window->VisibleRegion());
251 SetFocusWindow(window);
260 Desktop::RemoveWindow(WindowLayer* window)
263 if (fWindows.RemoveItem((void*)window)) {
266 BRegion dirty = window->VisibleRegion();
281 Desktop::IndexOf(WindowLayer* window) const
283 return fWindows.IndexOf((void*)window);
295 Desktop::HasWindow(WindowLayer* window) const
297 return fWindows.HasItem((void*)window);
322 WindowLayer* window = WindowAtFast(i);
323 if (!window->IsHidden() && window->VisibleRegion().Contains(where))
324 return window;
347 Desktop::MoveWindowBy(WindowLayer* window, int32 x, int32 y)
353 // the dirty region starts with the visible area of the window being moved
354 BRegion newDirtyRegion(window->VisibleRegion());
356 window->MoveBy(x, y);
362 // to move the contents of the window
363 BRegion copyRegion(window->VisibleRegion());
367 // include the the new visible region of the window being
369 newDirtyRegion.Include(&window->VisibleRegion());
387 Desktop::ResizeWindowBy(WindowLayer* window, int32 x, int32 y)
394 BRegion previouslyOccupiedRegion(window->VisibleRegion());
396 window->ResizeBy(x, y, &newDirtyRegion);
401 previouslyOccupiedRegion.Exclude(&window->VisibleRegion());
403 newDirtyRegion.IntersectWith(&window->VisibleRegion());
417 Desktop::ShowWindow(WindowLayer* window)
419 SetWindowHidden(window, false);
424 Desktop::HideWindow(WindowLayer* window)
426 SetWindowHidden(window, true);
431 Desktop::SetWindowHidden(WindowLayer* window, bool hidden)
437 if (window->IsHidden() != hidden) {
439 window->SetHidden(hidden);
445 // this window will not have a visible
451 dirty = window->VisibleRegion();
460 // window needs a redraw, but other windows
462 // of the window, and don't have to use MarkDirty()
463 dirty = window->VisibleRegion();
464 window->ProcessDirtyRegion(&dirty);
466 // when the window was hidden, the dirty region
479 Desktop::BringToFront(WindowLayer* window)
481 if (window == TopWindow())
487 // visible of the window
488 BRegion clean(window->VisibleRegion());
490 // detach window and re-atach at last position
491 if (fWindows.RemoveItem((void*)window) &&
492 fWindows.AddItem((void*)window)) {
497 // redraw what became visible of the window
498 BRegion dirty(window->VisibleRegion());
513 Desktop::SendToBack(WindowLayer* window)
515 if (window == BottomWindow())
520 // what is currently visible of the window
521 // might be dirty after the window is send to back
522 BRegion dirty(window->VisibleRegion());
524 // detach window and re-atach at last position
525 if (fWindows.RemoveItem((void*)window) &&
526 fWindows.AddItem((void*)window, 0)) {
531 // redraw what was previously visible of the window
532 BRegion clean(window->VisibleRegion());
547 Desktop::SetFocusWindow(WindowLayer* window)
549 if (fFocusWindow == window)
557 fFocusWindow = window;
587 Desktop::WindowDied(WindowLayer* window)
591 fWindows.RemoveItem(window);
603 // each window on the screen will take a portion from that area
608 // set clipping of each window
611 WindowLayer* window = WindowAtFast(i);
612 if (!window->IsHidden()) {
613 window->SetClipping(stillAvailableOnScreen);
615 stillAvailableOnScreen->Exclude(&window->VisibleRegion());
627 WindowLayer* window = WindowAtFast(i);
628 if (!window->IsHidden() && newDirtyRegion->Intersects(window->VisibleRegion().Frame()))
629 window->ProcessDirtyRegion(newDirtyRegion);