Control Panel needs a position check on startup

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Control Panel needs a position check on startup

Postby mbader » 16. January 2023 12:10

Sometimes when starting the XAMPP Control Panel, the position of the Control Panel is of the screen and therefore can't be accessed.
In this case, in the xampp-control.ini file, the parameter Left has a negative value:

[WindowSettings]
Left=-439

I assume this happens because of using the control panel with two screens and then starting it after that with only one screen.

I'm a long time xampp user (sind around 2005) and come accross this problem every once in a while. I then have to open up the xampp-control.ini and change the parameter from negative to positive and start the panel again.
For me this workaround - although annoying - works. But I can imagine that new users can't figure out what to do in this case.

I think the fix would be quite simple - on startup just check that the parameter Left is not negative and if it is, make it positive (or even 0 would work).

Is there a way, I can help to implement this solution? I looked around a bit but I didn't find the git repo - even though my gutfeeling is that it should be available somewhere, cause it's open source. Can someone maybe point me to the according GitHub-repo and I would be happy to create a pull request.
mbader
 
Posts: 2
Joined: 18. October 2021 09:26
XAMPP version: 8.0.11
Operating System: Windows 10

Re: Control Panel needs a position check on startup

Postby olafw23 » 13. September 2023 15:29

Confirming this persistant issue, as I encountered the same problem today with

- XAMPP 8.1.17
- Control Panel 3.3.0 [ Compiled: Apr 6th 2021 ]
- Windows 10 Pro 22H2

How to reproduce the problem (each possible direction of device arrangement will result in the same behaviour)

  1. Connect an external screen to the machine
  2. Select "Extended View" from the list that pops up when pressing the WINDOWS + P keyboard shortcut
  3. In Windows Settings > System > Screen (/Monitor?), arrange the external monitor, for instance, to the right
  4. Make use of the control panel, pan it around, make it sticky to the edges of the external screen or whatever --> [WindowSettings] in xampp-control-ini won't get updated "on the fly"
  5. Stop modules, close terminal, ... --> [WindowSettings] in xampp-control-ini won't get updated "on the fly"
  6. Quit Control panel --> The Left=... and Top=... values for x-axis and y-axis positions will be written to xampp-control.ini (given the file is writeable and doesn't throw the well-known "can't write..." error.)

As soon as one disconnects the given external screen and resumes with one of the following screen configurations...

  1. no external screen is connected to the computer
  2. any external screen is connected, but of much smaller size / screen resolution
  3. any external screen is connected, but arranged to a different orientation than before

...the program will read from xampp-control.ini and fetch the faulty x- or y-positon from [WindowSettings] without checking whether the control panel window is actually displayed on the screen's viewport.

  • ALT + TAB: A miniature of the control panel is visible and can get focus, but it's empty, only program title, version and compilation date are shown. The requested windows remains invisible
  • WINDOWS + TAB: similar behaviour
  • A click on the taskbar icon (if pinned to Windows taskbar) will "hide" the window that's not there and the task bar button will shrink; the small icon in the information bar next to the clock is accessible throug right-click
  • Additional clicks on the taskbar icon will open additional instances of the program and add one more info-shortcut to this area, each failing to display an actual GUI
  • Using "Show/Hide" from the pop-up menu after right-clicking on the info icon will have no effect

Suggested solutions:
  1. Add a menu button to the xampp-control Shortcut icon, like "Reset Window position" that resets the .ini file's [WindowSettings] to Left=0 and Top=0
  2. Let the process of quitting / exiting the control panel window do the same (imho, as long as there's no convenience option to be set by a user like "remember window position of the control panel", other positioning than 0/0 makes no sense anyways)

Last but not least:
The "What's included" button on the Download site says the most recent versions come with Control Panel v 3.2.4 (EDIT: which is false, 8.1.17 comes with controller 3.3.0 /EDIT), so I cannot tell whether there is a more up-to-date version included with XAMPP 8.0.x or later without having it installed.

Not sure whether to also post this to OP's older post from 2021 which describes the same problem for a former version...
olafw23
 
Posts: 1
Joined: 13. September 2023 13:15
XAMPP version: 8.1.17
Operating System: Windows 10 Enterprise 64-bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 130 guests