Skip to content

Conversation

@hx2A
Copy link
Collaborator

@hx2A hx2A commented Aug 18, 2025

By default, the thonny plugin will open a new window to the location 50,50, which is in the upper left corner of a one monitor setup. If the user moves the window to a new location, the plugin will remember the new location and open the next window to that location.

This works just fine for most people but not me. I have two monitors of different sizes, and it happens they are arranged in a way so that 50,50 is not visible on any monitor. Therefore, by default the window will open to an invisible location. This is very frustrating, it makes the plugin unusable on this machine.

I updated the code so that now if there is no previous stored location from a previous Sketch, it will default to the center of one of your displays. It will not put the window some place where you cannot see it.

@hx2A hx2A merged commit 5753edc into py5coding:main Aug 18, 2025
@hx2A hx2A deleted the fix-location-bug branch August 18, 2025 05:03
@villares
Copy link
Collaborator

Hurray!
I think might fix #44
I had this issue in class a few times and it is very frustrating.

To be extra cautious, the plug-in should forget about window location on Thonny restart, I'm not sure this is already the case.

@hx2A
Copy link
Collaborator Author

hx2A commented Aug 18, 2025

Hurray!
I think might fix #44
I had this issue in class a few times and it is very frustrating.

To be extra cautious, the plug-in should forget about window location on Thonny restart, I'm not sure this is already the case.

Yes, this should fix that problem. I believe it will forget the location on a restart but you should double check that.

@villares
Copy link
Collaborator

I believe it will forget the location on a restart but you should double check that.

For the record, I tested on Windows and it does not forget the window position. But maybe it's not a problem anymore, because it defaults to a sensible place... we'll see...

@hx2A
Copy link
Collaborator Author

hx2A commented Sep 19, 2025

I believe it will forget the location on a restart but you should double check that.

For the record, I tested on Windows and it does not forget the window position. But maybe it's not a problem anymore, because it defaults to a sensible place... we'll see...

Hmmm, this must be a Windows thing.

Does it get tripped up if you disconnect a monitor? If the Sketch window was last positioned on a screen that is now disconnected, sometimes that causes problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants