[haiku-commits] Change in haiku[master]: HaikuDepot: Fix Oscillating Pkg Selection

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 19 Apr 2020 03:46:06 +0000

From Andrew Lindesay <apl@xxxxxxxxxxxxxx>:

Andrew Lindesay has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/2498 ;)


Change subject: HaikuDepot: Fix Oscillating Pkg Selection
......................................................................

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
---
M src/apps/haikudepot/ui/FeaturedPackagesView.cpp
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/98/2498/1

diff --git a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp 
b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp
index 860d17e..3951139 100644
--- a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp
+++ b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp
@@ -173,7 +173,7 @@
                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);

--
To view, visit https://review.haiku-os.org/c/haiku/+/2498
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I38f75baba26b26183fd0cd1a6909e404f9f37b9b
Gerrit-Change-Number: 2498
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Lindesay <apl@xxxxxxxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: HaikuDepot: Fix Oscillating Pkg Selection - Gerrit