You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Original window geometry is not restored after showAt() #3384
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?
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:
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
Activity
hluk commentedon Feb 11, 2026
Hmm, strange, when clicking the tray icon, the menu should always open under mouse cursor.
CopyQ/src/gui/mainwindow.cpp
Line 2147 in 7ca0346
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:
hluk commentedon Feb 11, 2026
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:
CopyQ/src/scriptable/scriptableproxy.cpp
Line 898 in 7ca0346
I guess the blocking code does not work well on Windows.
Restore original window geometry after showAt()
[-]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()[/+]Restore original window geometry after showAt()
hluk commentedon Feb 11, 2026
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
richlux commentedon Feb 11, 2026
That fixed it!
Thanks,
Rich