PyCharm opens out of windows boundary in different Multiple Monitor Arrangement
System: windows 10 x64 pro v10.0.19041 build 19041, Pycharm-community v2020.1.3 x64
I have been using PyCharm-Community with 2 monitors in "extended mode" for months. No Problems.
The arrangement was with Left-Secondary-Vertical(1920x1080) Right-Primary-Horizontal(1080x1920) in extended view.
Today I changed the arrangement and switched them around.
The arrangement is now Left-Primary-Horizontal(1080x1920) with Right-Secondary-Vertical(1920x1080).
In both arrangements the Primary is horizontal and the Secondary is Vertical, the only difference now is that the Secondary moved from the Left side to the Right side.
The problem now is that PyCharm opens up out of bounds and I can't access any portion of the program's active window to drag it back into view. It insists on opening up to the Left of the Primary Display, despite the fact that the extended Secondary Display is now on the Right. Pycharm is not recognizing the "Secondary Display", but rather a vectored space which is NOT linked to windows 10 display parameters.
1. Which support file can I edit to erase the last known position and dimensions of the project's window? What are the default parameters/settings that I should enter as a work-around to reset the display dimensions?
2. I noticed that each project contains different window properties, because I found a project with which I could drag into view. Is there a global file that can be edited? How can I globally reset these windows properties/attributes so that I can reset PyCharm? (BTW, unfortunately for me, I opened another project which has made PyCharm disappear and irretrievable, which has lead me to ask for help)
3. Why doesn't Pycharm recognize the new display environment and "play nice" with "MSFT windows 10"? Why doesn't it know/recognize that the Secondary monitor is now on the right and simply open the project in the secondary display space like it did in configuration #1?
Please sign in to leave a comment.
Hi, you should be able to reset IDE position by:
A. Deleting .idea folder from the project's root
B. Deleting corresponding .xml from workspace/ in configuration directory - https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory
To avoid having to open each .xml to identify the project name, it's easier to just delete them all.
I did as you ask.
1. deleted project's .idea folder
2. deleted all *.xml from C:\Users\ME\AppData\Roaming\JetBrains\PyCharmCE2020.3\workspace
That did NOT work.
But I did deletr this 1 file and PyCharm appeared againg
C:\Users\ME\AppData\Roaming\JetBrains\PyCharmCE2020.3\options\window.state.xml
But as soon as I selected a project, PyCharm disappeared again to the Left beyond the monitor's boundary.
after I closed Pycharm from the taskbar I discovered that this file was generated again. So I opened this window.state.xml file and found this entry
<frame x="-1080" y="0" width="1080" height="1040" />
Notice that is still maintains the negative value despite deleting all workspace files before attempting to re-open PyCharm.
Why can't Pycharm reset itself?
Why does it fail to understand the current display environment? There is nothing to the Left anymore!
BTW, if I try to use Windows 10 "Task View" to move an app to a different virtual desktop, dragging PyCharm to a desktop causes it to disappear. PyCharm does not want to be relocated, nor does it move to another desktop.
Hmm, this sounds very strange indeed. Unfortunately I had no luck reproducing the issue.
Could you please submit an issue to https://youtrack.jetbrains.com/ , providing your Logs from **Help | Collect Logs and Diagnostic Data** and describing your monitor setup in detail (position, resolution, Windows multi-monitor arrangement settings) that cause the issue to reproduce?
I found only one similar issue which was fixed - https://youtrack.jetbrains.com/issue/IDEA-153291
Your case might be related.
Regarding my previous comment with respect to using windows 10 virtual desktops, I'd like to clarify the behavior. When PyCharm is behaves normally and is visible, it can be placed on any desktop. Dragging it to another virtual desktop works well. It's miniaturized window contains the screenshot of the PyCharm's window.
The broken behavior I'm describing only pertains to when PyCharm is "invisible" (out of bounds). When PyCharm is "invisible" and then use virtual desktops, and because it is an active/running app, PyCharm's facsimile appears. But now its window appears "white" and does not contain a screenshot of the program. And moving this miniaturized "white" PyCharm-window to another desktop causes PyCharm to disappear - crash.
Another detail discovered relating to this "invisible" behavior is that this occurs more profoundly when activating PyCharm from a pinned taskbar icon. Double clicking from a Desktop Icon, or activating PyCharm from Start | Search "PyCharm" allows PyCharm to open on the desktop and become visible, but when a project is selected it disappears (goes out of bounds to the left of the primary monitor). Again, this "invisible" behavior continues even after deleting all files recommended above. And again, the last known window state is still recorded as x = -1080. I have to ask, are there registry settings to keep MRU windows session? And again, if PyCharm using a vectored user space, why isn't it checking windows environment first? And why isn't it translating the vectored user space to be "in bounds"?
I tried to open another project (by selecting open "New Window") and it went "out of bounds". So on the next attempt I decided to select open in "This Window". It too failed. So I opened the project's file \.idea\workspace.xml. After scanning the file, I found the XML element <component name="WindowStateProjectService"> which contained offending vectors. This time I deleted only this XML element rather than deleting the entire file.
Then I attempted to open the same project with the window space vectors deleted and the resulting effect was for PyCharm to jump to virtual desktop #2 without opening the project nor PyCharm.
Next I went to another project with known "in bounds" vectors. Copied them and inserted them into the previous project in which I had deleted the vectors and attempted to open the project. This also failed. The behavior again was to jump from desktop #1 to desktop #2 without starting PyCharm or the project.
I should also mention that I have PyCharm Visible on desktop #1 with an older project. I did not restart PyCharm while making these file changes. Lastly, I deleted the entire folder .\.idea from the offending project and attempted to open it with the option "New Window". The result was the same; jumping to desktop #2 and nothing opened.
Now I lost PyCharm again. Using the pinned taskbar icon results now results in no response. Now the Icon is now non-functional. It does not even attempt to start PyCharm. Task Manager now doesn't show an active running process of PyCharm.
Back to square 1.
I followed the instructions in https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010108840/comments/360002523660 but instead of deleting the negative values, I made them small positive values. Then I opened my brand new projects w/o any .idea folder and it worked. It's a workaround, but it's better than not getting paid.