Bug #1224
Main window does not restore size on Mac (10.6) - gets shorter every time it runs
0%
Description
I have a Mac running 10.6. I had this problem with an old 0.7.x build that I was using before (was using it because newer official builds don't run on 10.6 - not sure if they're supposed to or not). Anyway, I wanted to upgrade to 0.9.0 so I built it from source using the official Qt 4.7.4 packages that were installed on my system and the bug persists so I figured I'd report it.
It shouldn't make a difference but I use the regular client. Not the monolithic client.
Steps to reproduce:
1) Launch Quassel (with a non-maximized window).
2) Quit Quassel.
3) Launch Quassel.
Expected result:
Window should be restored to the same size and position on the second launch.
Actual result:
Window is restored to the same position but is shorter. Approximately one title bar height shorter (or maybe a status bar height?).
Since I had the code on my machine in order to build it, I took a look to see what I could find. I found... nothing obvious. Debug statements revealed that the first resizeEvent is called with a size that is shorter than it should be but why that's happening, I cannot say. I did find a workaround that I'm now using but it's a bit of a hack. I would upload a patch but... I'm on the wrong computer now so maybe later. It's not too complicated though so I'll describe it.
My workaround is to suppress the initial (incorrect) resize event and explicitly resize the window again. This causes a new resize event to be delivered with the correct size.
The code in resizeEvent looks something like this:
if (firstResize) { firstResize = false; resize(_normalSize); return; }
Actually, before I settled on this, I removed the use of saveGeometry/restoreGeometry (which I've never liked) in favour of move+resize (ie. I removed the "maximized" conditional everywhere). It turns out this did not help the situation but it does demonstrate more clearly that the size passed to resize is different to the size that arrives in the first resizeEvent.
I tried searching but did not find anyone else reporting this issue so maybe it's somehow specific to my OS/Qt/install somehow. It certainly feels like maybe something in Qt. I would upgrade it but official Qt packages do not support co-installation (boo) and I have apps that break under 4.8 so... I'll live with my workaround for now.
Related issues
History
#1 Updated by lozzd almost 11 years ago
This is happening to me too, really annoying. Can I have your patched version? :)
#2 Updated by rapidDazz over 10 years ago
Still happening in v0.10.0 (git-575f27e*). On Mavericks.