yasb icon indicating copy to clipboard operation
yasb copied to clipboard

fix: Fix Monitor Specific Active Window Widget

Open robschreiber opened this issue 9 months ago • 0 comments

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.

robschreiber avatar May 21 '24 23:05 robschreiber