fix: Fix Monitor Specific Active Window Widget #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request #86
Description
The Active Window widget does not appropriately determine whether or not the text should be hidden if the monitor exclusive option is set to true. I set up an alternate method to identify what monitor a widget is on in the logic to determine whether or not the window title text should be hidden.
PyQT6 QWidgets don't have access to the win32 hwnd info for a monitor, they just return //Display 1 or //Display 2. We can identify what monitor a widget is on by using the screens x-offset and the hwnd monitor_info's rectangle x value (0 for the leftmost monitor and whatever the horizontal resolution of the first monitor is for the second, and so on). Just in case somebody has vertically stacked mutltiple monitors, there is also a check for the y value.
Related Issue
Fixes Issue #86
Testing
I made the change yesterday in my personal config and everything is working fine.