Opened 9 months ago

Closed 6 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 waddlesplash, 9 months ago

Component: User InterfaceApplications/Icon-O-Matic
Keywords: window position removed
Owner: changed from stippi to Zardshard

comment:2 by waddlesplash, 9 months ago

Milestone: UnscheduledR1/beta5

comment:3 by Zardshard, 9 months ago

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 updating fLastWindowFrame in IconEditorApp.cpp.

comment:4 by waddlesplash, 9 months ago

I think just a call to MoveOnScreen() should suffice?

comment:5 by Zardshard, 9 months ago

Ah, wasn't aware of that API. That should make it easier. You may need to update fLastWindowFrame after calling it.

comment:6 by Zardshard, 9 months ago

Can this be marked as easy?

comment:7 by pulkomandy, 9 months ago

Summary: Should restore default window position when it starts out of screenShould restore default window position when it starts out of screen (easy)

comment:8 by nephele, 7 months ago

Milestone: R1/beta5R1

comment:9 by boody, 6 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 pulkomandy, 6 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:11 by boody, 6 months ago

I think I got it you want it to open as you open it for the first time

comment:12 by boody, 6 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 pulkomandy, 6 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 boody, 6 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 nephele, 6 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 humdinger, 6 months ago

Wouldn't a simple MoveOnScreen() when creating the window solve the issue?

comment:17 by pulkomandy, 6 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:18 by humdinger, 6 months ago

Oops, didn't read that far back... :)

comment:20 by waddlesplash, 6 months ago

Milestone: R1R1/beta5
Resolution: fixed
Status: newclosed

Merged in hrev57775.

Note: See TracTickets for help on using tickets.