Menu

Reset window pos on restart?

Help
2024-05-31
2024-06-02
  • T. Bug Reporter

    T. Bug Reporter - 2024-05-31

    I'm trying to reconfigure a friend's KeePass installation, because he likes KeePass to be "Always on Top", which means that when he's done with it for the moment, he tends to drag it mostly off screen or shrink it to miniscule - and also sometimes loses track of where it is. I was hoping to add an enforced config that would clear the location data on startup, but neither of these config snippets work:

        <MainWindow>
            <!-- Always reset main window location and size to default: -->
            <X />
            <Y />
            <Width />
            <Height />
        </MainWindow>
    

    or

        <MainWindow>
            <!-- Always reset main window location and size to default: -->
            <X></X>
            <Y></Y>
            <Width></Width>
            <Height></Height>
        </MainWindow>
    

    Not only do neither of these work, but the presence of either also confuses KeePass to the point that it thinks it needs to rebuild the user config from scratch. (Several times now, I've had to retrieve it from his tmp folder.) What am I doing wrong?

     

    Last edit: T. Bug Reporter 2024-05-31
  • Paul

    Paul - 2024-05-31

    I'd give it some default values.

    cheers, Paul

            <X>978</X>
            <Y>250</Y>
            <Width>758</Width>
            <Height>574</Height>
    
     
  • T. Bug Reporter

    T. Bug Reporter - 2024-06-02

    Yes, that's what I went with for now, but he also plugs this laptop into an external monitor sometimes, and I was hoping to force KeePass to recenter itself based on the current screen(s) configuration with every restart.

     
  • Paul

    Paul - 2024-06-02

    KeePass 2.30 has repositioning logic so it should handle multiple monitors on its own.
    As for the initial position, try your suggestion. :)

    cheers, Paul

     

Log in to post a comment.