Bug 424015 - Un-maximizing main window that opened on second screen with different high-DPI scaling restores to massive size
Summary: Un-maximizing main window that opened on second screen with different high-DP...
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-09 03:31 UTC by Ralek Kolemios
Modified: 2021-08-28 11:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralek Kolemios 2020-07-09 03:31:24 UTC
When Krita is maximized, dragging the title bar in order to move the window to another screen will automatically resize Krita to close to 10,000 pixels wide, spanning across all 4 of my screens. It's nearly impossible, if not a huge hassle, to resize Krita back down to a reasonable size. This seems to happen on all releases.

Some specific details about my setup in case it's non-reproducible elsewhere:
Display 1: Cintiq 24 Pro, 3840x2160, 225% scaling
Display 2: generic monitor, 2560x1440, 100% scaling [Main display]
Display 3: generic monitor, 2560x1440, 100% scaling
Display 4: generic monitor, 2560x1440, 100% scaling

The issue happens if krita is dragged out of fullscreen from any monitor, most of the time. Sometimes it doesn't. Sometimes it gets really thin and really long. Sometimes it only happens when dragging between different scaling percentages.
Comment 1 Tiar 2021-08-24 14:40:19 UTC
Does it not happen for other programs? (I guess not, but I'm asking since I would guess a dragging from a fullscreen is not something one do with every program). Especially Qt-based ones like Kdenlive?
Comment 2 Alvin Wong 2021-08-26 13:01:17 UTC
I'm marking this as confirmed because I know that this can happen due to QMainWindow::saveState and restoreState not handling devicePixelRatio correctly. Fixing this would probably require hacking into Qt's code though.
Comment 3 Alvin Wong 2021-08-26 13:11:43 UTC
Or rather, it should be QWidget::saveGeometry and QWidget::restoreGeometry
Comment 4 Ralek Kolemios 2021-08-26 17:54:30 UTC
(In reply to Tiar from comment #1)
> Does it not happen for other programs? (I guess not, but I'm asking since I
> would guess a dragging from a fullscreen is not something one do with every
> program). Especially Qt-based ones like Kdenlive?

I've seen  it happen with one or two other programs over the years, but they seem to be issues with those specific programs and not with the OS' handling of windows in general as other applications are fine.