Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Monitor defaulting main window size and position #2693

Open
onemcg opened this issue Nov 29, 2024 · 0 comments
Open

Multi-Monitor defaulting main window size and position #2693

onemcg opened this issue Nov 29, 2024 · 0 comments

Comments

@onemcg
Copy link

onemcg commented Nov 29, 2024

Quit KVirc while it's right of the primary display, on 2nd monitor. Run KVirc and it will load defaults for window size and position.

KviMainWindow.cpp, line 145:
if((KVI_OPTION_RECT(KviOption_rectFrameGeometry).width() < 100) || (KVI_OPTION_RECT(KviOption_rectFrameGeometry).height() < 100) || (KVI_OPTION_RECT(KviOption_rectFrameGeometry).x() > g_pMainWindow->screen()->availableSize().width()) || (KVI_OPTION_RECT(KviOption_rectFrameGeometry).y() > g_pMainWindow->screen()->availableSize().height()))

Seems like availableSize() only cares about the one screen, while windows position is for the whole desktop. availableVirtualSize() might work, or just not checking the window position.

Also, KVirc currently doesn't check to see if the window position too far left. Just messing around with screen layouts, and negative positions seems to be a thing.


KVIrc 5.2.6 'Quasar'

Runtime Info:
System name: Windows Release : 10.0.22631
System version: Windows 11 23H2 Pro (x64) (Build 22631)
Architecture: AMD64 Family 25 Model 97 Stepping 2
Qt version: 6.6.2
Qt theme: fusion

Build Info:
Build date: 2024-10-11 13:33:28 UTC
Sources date: 20241011
Revision number: 5.2.6
CPU name: AMD64
Build command: C:/Program Files/CMake/bin/cmake.exe
Build flags:
MANDIR=share/man
CMAKE_INSTALL_PREFIX=D:/a/KVIrc/KVIrc/build/release
Threads=Win32
Compiler name: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe
Compiler flags: /DWIN32 /D_WINDOWS /GR /EHsc
Qt version: 6.6.2
Features: IRC, IPv6, Crypt, SSL, IPC, Transparency, Perl, Python, Enchant, Qt5, Qt6, KVS
OpenSSL version: OpenSSL 3.3.2 3 Sep 2024
OpenSSL compiler flags: compiler: C:\Program
OpenSSL built on: Fri Oct 11 11:15:27 2024 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant