From a4d578c4cb20baf67ba34807cb10ba3c17a60513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 26 Dec 2007 14:12:12 +0000 Subject: [PATCH] * small cleanups for more coding style consistency git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23159 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ViewLayer.cpp | 24 +++++++++--------------- src/servers/app/ViewLayer.h | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/servers/app/ViewLayer.cpp b/src/servers/app/ViewLayer.cpp index f1841c7462..743711b25e 100644 --- a/src/servers/app/ViewLayer.cpp +++ b/src/servers/app/ViewLayer.cpp @@ -1142,16 +1142,17 @@ ViewLayer::SetEventMask(uint32 eventMask, uint32 options) void ViewLayer::SetCursor(ServerCursor *cursor) { - if (cursor != fCursor) { - if (fCursor) - fCursor->Release(); + if (cursor == fCursor) + return; - fCursor = cursor; + if (fCursor) + fCursor->Release(); - if (fCursor) { - fCursor->Acquire(); - fCursor->SetPendingViewCursor(false); - } + fCursor = cursor; + + if (fCursor) { + fCursor->Acquire(); + fCursor->SetPendingViewCursor(false); } } @@ -1163,13 +1164,6 @@ ViewLayer::SetPicture(ServerPicture *picture) } -ServerPicture * -ViewLayer::Picture() const -{ - return fPicture; -} - - void ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping, BRegion* windowContentClipping, bool deep) diff --git a/src/servers/app/ViewLayer.h b/src/servers/app/ViewLayer.h index 26de773f33..a46507137b 100644 --- a/src/servers/app/ViewLayer.h +++ b/src/servers/app/ViewLayer.h @@ -37,8 +37,8 @@ class ServerPicture; class ViewLayer { public: ViewLayer(IntRect frame, IntPoint scrollingOffset, - const char* name, int32 token, uint32 resizeMode, - uint32 flags); + const char* name, int32 token, + uint32 resizeMode, uint32 flags); virtual ~ViewLayer(); @@ -164,8 +164,9 @@ class ViewLayer { ServerBitmap* ViewBitmap() const { return fViewBitmap; } - void SetViewBitmap(ServerBitmap* bitmap, IntRect sourceRect, - IntRect destRect, int32 resizingMode, int32 options); + void SetViewBitmap(ServerBitmap* bitmap, + IntRect sourceRect, IntRect destRect, + int32 resizingMode, int32 options); void PushState(); void PopState(); @@ -177,11 +178,12 @@ class ViewLayer { uint32 EventOptions() const { return fEventOptions; } - ServerCursor* Cursor() const { return fCursor; } void SetCursor(ServerCursor* cursor); + ServerCursor* Cursor() const { return fCursor; } - ServerPicture* Picture() const; void SetPicture(ServerPicture* picture); + ServerPicture* Picture() const + { return fPicture; } // for background clearing virtual void Draw(DrawingEngine* drawingEngine, @@ -223,7 +225,7 @@ class ViewLayer { // clipping void RebuildClipping(bool deep); BRegion& ScreenClipping(BRegion* windowContentClipping, - bool force = false) const; + bool force = false) const; void InvalidateScreenClipping(); inline bool IsScreenClippingValid() const { return fScreenClippingValid; } @@ -233,7 +235,7 @@ class ViewLayer { protected: void _MoveScreenClipping(int32 x, int32 y, - bool deep); + bool deep); Overlay* _Overlay() const; void _UpdateOverlayView() const;