Community
    • 登入

    Error in the window location when disabling the second monitor

    已排程 已置頂 已鎖定 已移動 General Discussion
    8 貼文 4 Posters 708 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Александр ВилковА
      Александр Вилков
      最後由 編輯

      If the last location of the program window was on the second monitor located on the right, then when you try to start the program without the second monitor, the program window will be located outside of the viewport.

      It helps to either completely reinstall or change the “x” parameter in the “GUIConfig name= “AppPosition”” block in the file “C:\Users******\AppData\Roaming\Notepad++\config.xml”.

      Please fix this problem , it really tormented me.

      Alan KilbornA 1 條回覆 最後回覆 回覆 引用 0
      • Alan KilbornA
        Alan Kilborn @Александр Вилков
        最後由 編輯

        @Александр-Вилков

        Solving these types of problems isn’t easy.
        I’ve seen similar things with “big name” programs, Outlook, Excel, Chrome…
        If those developers can’t solve it very well, there is no hope. :-)

        gstaviG 1 條回覆 最後回覆 回覆 引用 0
        • EkopalypseE
          Ekopalypse
          最後由 編輯

          One trick which can be used in this case is to press alt+spacebar and then M to move the window with the arrow keys.

          Alan KilbornA 1 條回覆 最後回覆 回覆 引用 2
          • Alan KilbornA
            Alan Kilborn @Ekopalypse
            最後由 編輯

            @Ekopalypse said in Error in the window location when disabling the second monitor:

            press alt+spacebar and then M to move the window with the arrow keys.

            Yes, and you get a strong hint for which arrow key to use to bring the window back into view by where the popup menu appears when you press Alt+spacebar: You hold down the arrow key opposite where the popup appears.

            Example: If the popup window appears on the righthand side of your monitor, it means the window is far off to the right, and you want to hold down the left arrow key to move it back into viewable space.

            1 條回覆 最後回覆 回覆 引用 3
            • gstaviG
              gstavi @Alan Kilborn
              最後由 編輯

              @Alan-Kilborn
              If deleting lines in config.xml solves the problem then this is a self inflicted wound that Notepad++ can fix by itself.
              There is nothing automatic about config.xml. Notepad++ must be reading it and then Move the Window explicitly into an invalid location. A few ‘if’ statements before this Move should fix the issue.

              I would also expect an option of “remember window location” that could be unselected to allow Windows to select a valid location.

              The TagLEET plugin normally opens its window near the selected text but I also added tests against Monitor coordinates in case NP++ is strangely located outside the screen.
              It is mostly a pair of calls to MonitorFromWindow and GetMonitorInfo, then compare coordinates to the returned rect.

              Alan KilbornA 1 條回覆 最後回覆 回覆 引用 2
              • Alan KilbornA
                Alan Kilborn @gstavi
                最後由 編輯

                @gstavi

                Sure. That’s why in 2020 I am continually applying the Alt+Spacebar solution to the big name programs I already mentioned when my monitor configuration changes, and I’ll add these others to the list as well: WinZip and SnagIt

                1 條回覆 最後回覆 回覆 引用 0
                • gstaviG
                  gstavi
                  最後由 編輯

                  Supporting multiple monitor configurations is a relatively new technology since laptops and docking stations became popular.

                  There is lots of SW and lot of bugs.
                  Some of the bugs are due to incompetence and other just effect a small percentage of users so developers are unaware or don’t care.
                  There are 2 rather different scenarios:

                  • Changing screen configuration while application is running.
                  • Relaunching application in a different screen configuration.

                  The ‘relaunch’ scenario should be much simpler. If an application is not doing anything Windows will just select valid coordinates for its main window. if an application moves itself into an invalid location that “it saved” this is “self inflicted” and negligence on behalf of its developers.

                  The “changing” scenario is far more difficult. I can testify that changing between high DPI and normal DPI screens is not handled correctly even by the desktop (explorer) and not by relaunching explorer.exe. It requires log off and log in to fix.

                  1 條回覆 最後回覆 回覆 引用 3
                  • EkopalypseE
                    Ekopalypse
                    最後由 編輯

                    With merging this PR npp uses new code to calculate where the find dialog
                    needs to be shown. I hope/assume that it will be used in other areas
                    as well once it is known as a stable feature.

                    1 條回覆 最後回覆 回覆 引用 1
                    • 第一個貼文
                      最後的貼文
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors