Skip to content

Original window geometry is not restored after showAt() #3384

Closed

Description

@richlux

On Windows, when I first run CopyQ, if I click the icon in the system tray, the main window opens in the bottom right corner above the system tray, as expected. If I later use a hotkey to open the CopyQ window under the cursor somewhere, the next time I click the CopyQ icon in the system tray, the window opens in the last position it was in when I used the hotkey. Shouldn't it reset and open above the system tray icon that I clicked?

Thanks,
Rich

Activity

  1. hluk commented on Feb 11, 2026

    @hluk
    Owner

    Hmm, strange, when clicking the tray icon, the menu should always open under mouse cursor.

    return toggleMenu(menu, QCursor::pos());

    Maybe QCursor::pos() does not always work on Windows. 🤔

    BTW, you can check if the cursor position gives valid/different values from Action dialog by running a command that opens notification with the cursor position:

    copyq popup(pointerPosition())
    
  2. added
    help wantedNeeds a volunteer to investigate/implement the issue
    on Feb 11, 2026
  3. hluk commented on Feb 11, 2026

    @hluk
    Owner

    Oh, sorry, it's about main window position, not the tray menu.

    Yeah, there is a code to blocks saving window position if it is open under cursor, so it does not open again on the same position:

    setGeometryWithoutSave(m_wnd, rect);

    I guess the blocking code does not work well on Windows.

  4. added a commit that references this issue on Feb 11, 2026
    94db4b9
  5. removed
    help wantedNeeds a volunteer to investigate/implement the issue
    WindowsRelates to Windows OS
    on Feb 11, 2026
  6. changed the title [-]Shouldn't clicking the icon in the system tray open the main window in the same place every time?[/-] [+]Original window geometry is not restored after showAt()[/+] on Feb 11, 2026
  7. added a commit that references this issue on Feb 11, 2026
    8db59c7
  8. hluk commented on Feb 11, 2026

    @hluk
    Owner

    Fixed. The binaries with the fix for Windows should be available at AppVeyor (when it finally finishes - it's very slow currently): https://ci.appveyor.com/project/hluk/copyq/builds/53524499/artifacts

  9. richlux commented on Feb 11, 2026

    @richlux
    Author

    That fixed it!

    Thanks,
    Rich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions