Opened 13 years ago
Closed 10 years ago
#907 closed defect (fixed)
[PATCH] Wrong window position on Windows with taskbar on top
Reported by: | vts | Owned by: | |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Alpha 17 |
Component: | Core engine | Keywords: | patch windows |
Cc: | Patch: |
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 (1)
Change History (11)
by , 13 years ago
Attachment: | wsdl_window_pos_patch.patch added |
---|
comment:1 by , 13 years ago
Milestone: | Backlog → Alpha 7 |
---|
comment:2 by , 13 years ago
Keywords: | simple patch added |
---|
comment:3 by , 13 years ago
Keywords: | simple review removed |
---|
comment:4 by , 13 years ago
Milestone: | Alpha 7 → Alpha 8 |
---|
follow-up: 6 comment:5 by , 13 years ago
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.
follow-up: 8 comment:6 by , 12 years ago
Milestone: | Alpha 8 → 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 by , 11 years ago
Keywords: | windows added |
---|
comment:8 by , 11 years ago
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.
follow-up: 10 comment:9 by , 11 years ago
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).
comment:10 by , 10 years ago
Milestone: | Backlog → Alpha 17 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to historic_bruno:
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).
This is what we do, and SDL2 is now the default on Windows as of r15786, so I'm resolving this as "fixed".
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.