hrev45322 adds 1 changeset to branch 'master' old head: 733be65954f85c0c0cd57d0bec95d8a47f9d1f4a new head: 2a5c1f12b9c0452aa1c701e235d0d745285f827a overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=2a5c1f1+%5E733be65 ---------------------------------------------------------------------------- 2a5c1f1: Fix #9469 again in a better way. Pass fTime into the IsHidden() method to check the hidden state from the point of view of fTime which will ignore the hidden state. of the window. Remove the Hide(), Show(), and IsHidden() overrides in TimeView as they are no longer needed. Thanks Stippi and Axel. [ John Scipione <jscipione@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45322 Commit: 2a5c1f12b9c0452aa1c701e235d0d745285f827a URL: http://cgit.haiku-os.org/haiku/commit/?id=2a5c1f1 Author: John Scipione <jscipione@xxxxxxxxx> Date: Mon Feb 25 16:57:18 2013 UTC Ticket: https://dev.haiku-os.org/ticket/9469 ---------------------------------------------------------------------------- 3 files changed, 5 insertions(+), 27 deletions(-) src/apps/deskbar/StatusView.cpp | 7 +++++-- src/apps/deskbar/TimeView.cpp | 22 ---------------------- src/apps/deskbar/TimeView.h | 3 --- ---------------------------------------------------------------------------- diff --git a/src/apps/deskbar/StatusView.cpp b/src/apps/deskbar/StatusView.cpp index 947773f..b25c7af 100644 --- a/src/apps/deskbar/StatusView.cpp +++ b/src/apps/deskbar/StatusView.cpp @@ -433,7 +433,9 @@ TReplicantTray::ShowHideTime() if (fTime == NULL) return; - if (fTime->IsHidden()) + // Check from the point of view of fTime because we need to ignore + // whether or not the parent window is hidden. + if (fTime->IsHidden(fTime)) fTime->Show(); else fTime->Hide(); @@ -441,7 +443,8 @@ TReplicantTray::ShowHideTime() RealignReplicants(); AdjustPlacement(); - bool showClock = !fTime->IsHidden(); + // Check from the point of view of fTime ignoring parent's state. + bool showClock = !fTime->IsHidden(fTime); // Update showClock setting that gets saved to disk on quit ((TBarApp*)be_app)->Settings()->showClock = showClock; diff --git a/src/apps/deskbar/TimeView.cpp b/src/apps/deskbar/TimeView.cpp index 02e7162..18217eb 100644 --- a/src/apps/deskbar/TimeView.cpp +++ b/src/apps/deskbar/TimeView.cpp @@ -188,17 +188,6 @@ TTimeView::GetPreferredSize(float* width, float* height) void -TTimeView::Hide() -{ - // Prevent overflow - if (fShowLevel < INT16_MAX) - ++fShowLevel; - - BView::Hide(); -} - - -void TTimeView::MessageReceived(BMessage* message) { switch (message->what) { @@ -307,17 +296,6 @@ TTimeView::ResizeToPreferred() } -void -TTimeView::Show() -{ - // Prevent underflow - if (fShowLevel > INT16_MIN) - --fShowLevel; - - BView::Show(); -} - - // # pragma mark - Public methods diff --git a/src/apps/deskbar/TimeView.h b/src/apps/deskbar/TimeView.h index 9f28a1c..ba823dd 100644 --- a/src/apps/deskbar/TimeView.h +++ b/src/apps/deskbar/TimeView.h @@ -88,13 +88,10 @@ public: void Draw(BRect update); void FrameMoved(BPoint); void GetPreferredSize(float* width, float* height); - void Hide(); - bool IsHidden() const { return fShowLevel > 0; }; void MessageReceived(BMessage*); void MouseDown(BPoint where); void Pulse(); void ResizeToPreferred(); - void Show(); bool Orientation() const; void SetOrientation(bool o);