Closed nnako closed 4 months ago
@nnako Can you print the self._hmon
and see if it had valid value?
Hi @klesh
I see the following behaviour:
after setting a breakpoint to
C:\Users\USER\_NEXTCLOUD\_TOOLS\_Python\APP__JigsawWM\src\jigsawwm\w32\monitor.py:155
which points into the function get_info()
here:
def get_info(self) -> MONITORINFOEX:
"""Retrieves monitor information
:returns: monitor information
:rtype: MONITORINFOEX
"""
monitor_info = MONITORINFOEX()
monitor_info.cbSize = sizeof(monitor_info)
---> if not user32.GetMonitorInfoA(self._hmon, pointer(monitor_info)):
raise WinError(get_last_error())
return monitor_info
then continue
until the 1st hit, self._hmon
shows a value of 65539
. After issuing the next continue
, the windows are set up on the big monitor (properly, as intended), but the value of self._hmon
now shows 0
in the marked line. Which seems to be responsible for raising the WinError in the next line.
Do you have multiple monitors or using virtual desktops?
Hi @klesh , sorry for the delay...
I use multiple monitors. The main one is the built-in monitor of my laptop and the other one is connected via a HP docking station which in turn is connected to my laptop via USB-C. No virtual desktops. The screen configuration looks like this:
x=0
|
|
- +----------------------+
^ | |
| | +----------------+ --- y=0
| | 55 inch | 17 inch | ^
2160 | | secondary screen | main screen | | 1080
px | | external monitor | laptop monitor | v px
| | +----------------+ -
v | |
- +----------------------+
|<-------------------->|<-------------->|
3840 px 1280 px
The odd thing is that this feature worked fine until some weeks ago. I didn't change anything as I was happy to at least be able to realize a static window location configuration (by double-clicking on a desktop icon). As the application now crashes at the described point in code, I can not change the window configuration by keyboard hotkeys. The application is not running properly anymore to evaluate the hotkeys for that.
Any suggestions? Any hints where I could have a look myself?
To test if the effect has anything to do with my local setting, I just re-set my docking station where the secondary screen is connected to. And... the tool works fine again.
Must have been an error within my docking station having caused the effects described here. Closing the issue. Thanks.
Hi,
starting about two weeks ago,
JigsawWM
suddenly will not operate correctly when I start my widescreen example.Normally, I start a batch script which opens the virtual environment and starts the example from the repo:
Then the windows which I have placed on my big screen get arranged and I am given the control over the functionality by hotkeys as defined within the example. But now, after arranging the windows, I get error messages within the console. And I can only exit by pressing
<CTRL> + <C>
.I did no change to the code for months. Maybe the Windows OS changed its behaviour and the implemented
JigsawWM
interface is not able to work out these differences? At least, the error essentially shows an "invalid monitor handle".What could this be? Where should I start looking for the cause within the code?
Here the debug and error outputs from the console (it is essentially the same error code block printed four times, which seems odd to me as well):