• Login
Community
  • Login

Error in the window location when disabling the second monitor

Scheduled Pinned Locked Moved General Discussion
8 Posts 4 Posters 488 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • А
    Александр Вилков
    last edited by Mar 17, 2020, 6:39 AM

    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.

    A 1 Reply Last reply Mar 17, 2020, 11:44 AM Reply Quote 0
    • A
      Alan Kilborn @Александр Вилков
      last edited by Mar 17, 2020, 11:44 AM

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

      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. :-)

      G 1 Reply Last reply Mar 17, 2020, 11:24 PM Reply Quote 0
      • E
        Ekopalypse
        last edited by Mar 17, 2020, 12:25 PM

        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.

        A 1 Reply Last reply Mar 17, 2020, 12:29 PM Reply Quote 2
        • A
          Alan Kilborn @Ekopalypse
          last edited by Mar 17, 2020, 12:29 PM

          @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 Reply Last reply Reply Quote 3
          • G
            gstavi @Alan Kilborn
            last edited by Mar 17, 2020, 11:24 PM

            @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.

            A 1 Reply Last reply Mar 18, 2020, 12:36 AM Reply Quote 2
            • A
              Alan Kilborn @gstavi
              last edited by Mar 18, 2020, 12:36 AM

              @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 Reply Last reply Reply Quote 0
              • G
                gstavi
                last edited by Mar 18, 2020, 9:09 AM

                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 Reply Last reply Reply Quote 3
                • E
                  Ekopalypse
                  last edited by Mar 22, 2020, 12:19 PM

                  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 Reply Last reply Reply Quote 1
                  2 out of 8
                  • First post
                    2/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors