Opened 8 months ago
Closed 5 months ago
#18865 closed bug (fixed)
Should restore default window position when it starts out of screen (easy)
Reported by: | slema | Owned by: | Zardshard |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Applications/Icon-O-Matic | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
I changed my desktop from 4k to 1080 at some point. As a result the position for Icon-O-Matic kept opening out of screen. Visually I saw nothing. When I opened it from filetypes nothing happened apparently as it was indeed visible but outside of screen bounds.
I believe that if on app startup the window to be restored is out of maximum visible area the default size should be restored (this is what I did manually by going into the settings and deleting the settings file for icon-o-matic before restarting it).
Change History (20)
comment:1 by , 8 months ago
Component: | User Interface → Applications/Icon-O-Matic |
---|---|
Keywords: | window position removed |
Owner: | changed from | to
comment:2 by , 8 months ago
Milestone: | Unscheduled → R1/beta5 |
---|
comment:3 by , 8 months ago
comment:5 by , 8 months ago
Ah, wasn't aware of that API. That should make it easier. You may need to update fLastWindowFrame
after calling it.
comment:7 by , 8 months ago
Summary: | Should restore default window position when it starts out of screen → Should restore default window position when it starts out of screen (easy) |
---|
comment:8 by , 6 months ago
Milestone: | R1/beta5 → R1 |
---|
comment:9 by , 5 months ago
Could you please tell me how to reproduce this issue? I've been changing the resolution of the screen and nothing happens
comment:10 by , 5 months ago
- Set your screen to a large resolution
- Open Icon-O-Matic
- Move the window to somewhere in the bottom right of the screen (maybe mostly offscreen with just a bit of the titlebar visible)
- Close Icon-O-Matic
- Switch to a low resolution
- Open Icon-O-Matic again
It will remember its latest position, if you put it far enough to the bottom or right, it will not be in the visible part of the screen anymore.
comment:12 by , 5 months ago
But what this got to do with the resolution? It remembers its position wether you change the resolution or not
comment:13 by , 5 months ago
Yes, but when you change to a smaller resolution, the previous position can end up being out of the screen. In this case, the window should be moved so it is back into the visible part of the screen, so users are not confused by an apparently invisible and unreachable window.
comment:14 by , 5 months ago
I understand this issue. I mean the solution to this issue has nothing to do with the resolution. Is that true?
comment:15 by , 5 months ago
You need to check if the window position it wants to restore is valid, that is visible in the currently configured screen area. If it is not don‘t restore the window position and instead adopt a default window position.
comment:16 by , 5 months ago
Wouldn't a simple MoveOnScreen() when creating the window solve the issue?
comment:17 by , 5 months ago
Yes, as Waddlesplash already commented 3 months ago, the MoveOnScreen() function already takes care of all the details. Just call it at the right place.
comment:20 by , 5 months ago
Milestone: | R1 → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Merged in hrev57775.
This looks like it would make a good easy ticket.
Hint to whoever decides to take this up: figure out a way to get the screen's size, perhaps through
BScreen::GetMode
, and take that into account when updatingfLastWindowFrame
in IconEditorApp.cpp.