Now also hide/show the cursor when BDirectWindow::SetFullScreen() is called.
in the handler, instead of checking if the window is an offscreen one, check if fDirectWindowData is NULL, and do nothing if it's the case. When setting a clip region in ServerPicture, also invalidate the clipping. To do so, I added a public ServerWindoow::UpdateCurrentDrawingRegion() which just calls the private function. Please review and see if it can be done better. This fixes the problem with BPicture and the ConstrainClippingRegion() op (see ticket #1389) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32087 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d594d16e24
commit
3bd4966700
@ -477,6 +477,7 @@ set_clipping_rects(View *view, const BRect *rects, uint32 numRects)
|
||||
for (uint32 c = 0; c < numRects; c++)
|
||||
region.Include(rects[c]);
|
||||
view->SetUserClipping(®ion);
|
||||
view->Window()->ServerWindow()->UpdateCurrentDrawingRegion();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
link.Read<bool>(&enable);
|
||||
|
||||
status_t status = B_OK;
|
||||
if (!fWindow->IsOffscreenWindow()) {
|
||||
if (fDirectWindowData != NULL) {
|
||||
//fDesktop->UnlockSingleWindow();
|
||||
_DirectWindowSetFullScreen(enable);
|
||||
//fDesktop->LockSingleWindow();
|
||||
@ -3719,6 +3719,8 @@ void
|
||||
ServerWindow::_DirectWindowSetFullScreen(bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
fDesktop->HWInterface()->SetCursorVisible(false);
|
||||
|
||||
fDirectWindowData->old_window_frame = fWindow->Frame();
|
||||
BRect screenFrame =
|
||||
fDesktop->ActiveScreen()->Frame();
|
||||
@ -3737,7 +3739,9 @@ ServerWindow::_DirectWindowSetFullScreen(bool enable)
|
||||
oldFrame.top - fWindow->Frame().top);
|
||||
fDesktop->ResizeWindowBy(fWindow,
|
||||
oldFrame.Width() - fWindow->Frame().Width(),
|
||||
oldFrame.Height() - fWindow->Frame().Height());
|
||||
oldFrame.Height() - fWindow->Frame().Height());
|
||||
|
||||
fDesktop->HWInterface()->SetCursorVisible(true);
|
||||
}
|
||||
|
||||
fDesktop->SetWindowFeel(fWindow,
|
||||
|
@ -104,6 +104,9 @@ public:
|
||||
|
||||
void ResyncDrawState();
|
||||
|
||||
// TODO: Change this
|
||||
inline void UpdateCurrentDrawingRegion() { _UpdateCurrentDrawingRegion(); };
|
||||
|
||||
private:
|
||||
View* _CreateView(BPrivate::LinkReceiver &link,
|
||||
View **_parent);
|
||||
@ -127,8 +130,9 @@ private:
|
||||
|
||||
void _SetCurrentView(View* view);
|
||||
void _UpdateDrawState(View* view);
|
||||
public:
|
||||
void _UpdateCurrentDrawingRegion();
|
||||
|
||||
private:
|
||||
bool _MessageNeedsAllWindowsLocked(uint32 code) const;
|
||||
|
||||
void _DirectWindowSetFullScreen(bool set);
|
||||
|
Loading…
Reference in New Issue
Block a user