Ticket #907 (new defect)

Opened 2 years ago

Last modified 5 days ago

[PATCH] Wrong window position on Windows with taskbar on top

Reported by: vts Owned by:
Priority: If Time Permits Milestone: Backlog
Component: Core engine Keywords: patch windows
Cc:

Description

On Windows, if the taskbar is at the top of the screen, windows spawned at (0,0) will slide under the taskbar and hide the min/max/X controls. This small patch first queries for the usable desktop area and spawns the window relative to that instead.

Attachments

wsdl_window_pos_patch.patch (951 bytes) - added by vts 2 years ago.

Change History

Changed 2 years ago by vts

comment:1 Changed 2 years ago by historic_bruno

  • Milestone changed from Backlog to Alpha 7

comment:2 Changed 2 years ago by k776

  • Keywords simple, review, patch added; review removed

comment:3 Changed 23 months ago by Philip

  • Keywords simple, review, removed

This doesn't seem to work properly in fullscreen mode - when I test on Vista with the taskbar at the top of the screen, the taskbar remains visible (above the fullscreen game area) and the bottom of the game falls off the bottom of the screen and isn't visible. I guess this should only be applied in non-fullscreen mode.

comment:4 Changed 22 months ago by k776

  • Milestone changed from Alpha 7 to Alpha 8

comment:5 follow-up: ↓ 6 Changed 22 months ago by vts

My bad -- my earlier patch indeed doesn't take fullscreen mode into account. There have been some talks about moving away from WSDL to regular SDL which might deal with this automatically, so I'm currently unsure whether to go ahead and fix it or leave it and wait for the move to regular SDL.

comment:6 in reply to: ↑ 5 ; follow-up: ↓ 8 Changed 20 months ago by historic_bruno

  • Milestone changed from Alpha 8 to Backlog

Replying to vts:

My bad -- my earlier patch indeed doesn't take fullscreen mode into account. There have been some talks about moving away from WSDL to regular SDL which might deal with this automatically, so I'm currently unsure whether to go ahead and fix it or leave it and wait for the move to regular SDL.

I tested switching from wsdl to official SDL 1.2, and there are bugs to work around, the most serious is #741 (affects both Windows and OS X). It seems unlikely we will be switching from wsdl in the near future, certainly not before that bug is fixed.

comment:7 Changed 6 days ago by Markus

  • Keywords windows added

comment:8 in reply to: ↑ 6 Changed 5 days ago by historic_bruno

Replying to historic_bruno:

I tested switching from wsdl to official SDL 1.2, and there are bugs to work around, the most serious is #741 (affects both Windows and OS X). It seems unlikely we will be switching from wsdl in the near future, certainly not before that bug is fixed.

These have been fixed in SDL 2.0 (see progress at #935), and I will test this issue as well.

comment:9 Changed 5 days ago by historic_bruno

Hmm no, the positioning under the taskbar bug still occurs in SDL 2.0, actually it's even worse because it places the window off screen if 0,0 is used for the window coordinates. They don't consider this a bug, rather a missing API. However, it can be covered up by using SDL_WINDOWPOS_* macros (we should use these anyway with SDL 2.0, because they offer multidisplay support).

Last edited 5 days ago by historic_bruno (previous) (diff)
Note: See TracTickets for help on using tickets.