Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to a timer-based approach for Firefox handling #960

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

dalyIsaac
Copy link
Owner

@dalyIsaac dalyIsaac commented Aug 1, 2024

After switching the logger to a less verbose option, it turns out that the FirefoxWindowProcessor wouldn't work reliably. I think two things were occurring here:

  1. No EVENT_OBJECT_CLOAKED event was being sent sometimes, causing Whim to ignore events to the Firefox window.
  2. The Firefox window wouldn't respect Whim's SetWindowPos calls due to Firefox's window startup logic.

The following changes have been made, respectively:

  1. The FirefoxWindowProcessor now listens to all events after a timeout of 5 seconds. This is unpleasant, but seems necessary to handle the case when EVENT_OBJECT_CLOAKED was not emitted.
  2. Ignored events can now trigger layouts. This necessitated a change to the WindowProcessorManager.

@dalyIsaac dalyIsaac added bug Something isn't working core Whim labels Aug 1, 2024
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.06%. Comparing base (5432198) to head (31886a2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #960   +/-   ##
=======================================
  Coverage   81.06%   81.06%           
=======================================
  Files         274      274           
  Lines       11523    11534   +11     
  Branches     1293     1294    +1     
=======================================
+ Hits         9341     9350    +9     
- Misses       2008     2009    +1     
- Partials      174      175    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dalyIsaac dalyIsaac marked this pull request as ready for review August 1, 2024 12:36
@dalyIsaac dalyIsaac merged commit 54813b0 into main Aug 1, 2024
8 checks passed
@dalyIsaac dalyIsaac deleted the yet-another-firefox-fix branch August 1, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Whim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant