From a6a45d1b92e2dd1a8d6752c02d5a072cb711e8c3 Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Sun, 19 Apr 2020 15:44:45 +1200 Subject: [PATCH] HaikuDepot: Fix Oscillating Pkg Selection The views for prominent and list packages were both getting mouse click events and they were both sending the "package changed" to the MainWindow which, with the two queued messages, ended up in a feedback loop constantly oscillating between the two packages from the two views. This problem is resolved in this commit by stopping one of the views processing the events if it is hidden -- because it is not the selected tab. Resolves #15884 Change-Id: I38f75baba26b26183fd0cd1a6909e404f9f37b9b Reviewed-on: https://review.haiku-os.org/c/haiku/+/2498 Reviewed-by: waddlesplash --- src/apps/haikudepot/ui/FeaturedPackagesView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp index 157b773fdf..56bc62276f 100644 --- a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp +++ b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp @@ -171,7 +171,7 @@ public: ConvertFromParent(&parentBounds); bounds = bounds & parentBounds; - if (bounds.Contains(where) && Window()->IsActive()) { + if (bounds.Contains(where) && Window()->IsActive() && !IsHidden()) { BMessage message(MSG_PACKAGE_SELECTED); message.AddString("name", PackageName()); Window()->PostMessage(&message);