chatterino2
chatterino2 copied to clipboard
Cannot move window via top bar or resize window after clicking the add account button
Describe the bug After clicking the add account button, you cannot move the window using the top bar or resize using the edge of the application
To reproduce
- Click and drag the window using the top bar, notice it works normally
- Go to settings to add account, click add account
- Close the window, close the settings
Screenshots
https://user-images.githubusercontent.com/41973452/160349134-e34508d1-20dd-4550-8212-b6bf956e0f43.mp4
Chatterino version commit a9b1af60d
Operating system Windows 10
I am able to reproduce this on Windows 10 1909
I still can't move it too win 10 21h1
I also am able to reproduce this issue on: OS Name: Microsoft Windows 10 Home Version: 10.0.19042 Build 19042
Still seeing this. Have to relaunch the app to reset it. Windows 10 21H2
same issue here, luckily closing and reopening fixes it
Still able to repo this: Chatterino 2.3.5 (commit 81a62764c) Windows 10 21H2
Still reproducible with commit 81a62764c Windows 11
Still reproducible with commit 81a6276
That's why the issue is still open edit: Also that commit is from April so even if we had fixed it you wouldn't have the fix.
Still reproducible with commit 81a6276
That's why the issue is still open edit: Also that commit is from April so even if we had fixed it you wouldn't have the fix.
This is fixed in https://github.com/Chatterino/chatterino2/pull/3636/commits/e269a75c1bd2e5d77e923c423711d49a1115c6a4 but was closed without being approved.
Using platform specific calls to lock Qt windows is less than ideal, and the original purpose is dubious, so just removing this macro qualified windows api call makes sense. The account panel is already "always on top" relative other chatterino windows while open, so being able to move or resize a window behind it doesn't seem like a benefit nor does it seem to pose any security risk to allow it to be moved afaik.
I might suggest disabling chat input while account panel is open to avoid accidental pastes to chat, but that is unrelated and not affected by this issue or fix.
Otherwise you probably have to fully redraw the main window to fix it; just calling ::SetWindowPos without the flags won't reset the permissions.
edit: I found the closed PR when I went to upload the same fix, so I didn't make a duplicate pull.
@derossm the reason why that PR wasn't merged is because it causes issues with chatterino's "Always On Top" setting when enabled. It really does require a call to some Windows shit just to prevent that from being an issue. If you wanna take a crack at fixing it be my guest - I haven't had the incentive to fix it as I don't use Windows.