Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_VIDEO_WINDOW_POS, Mac OS X, OpenGL #434

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

SDL_VIDEO_WINDOW_POS, Mac OS X, OpenGL #434

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 1.2.13
Reported for operating system, platform: Mac OS X (All), PowerPC

Comments on the original bug report:

On 2008-09-22 03:48:51 +0000, Ryan C. Gordon wrote:

If you try to force the window position with the SDL_VIDEO_WINDOW_POS environment variable, the Quartz backend will incorrectly set the GL viewport and scissor inside a Cocoa call.

Running this under OpenGL Profiler and setting a breakpoint on glScissor shows us this is the culprit:

    [ gl_context setView: window_view ];

...in QZ_SetVideoWindowed().

--ryan.

On 2008-09-22 03:51:16 +0000, Ryan C. Gordon wrote:

Created attachment 280
Reproduction case.

Attached a test program that illustrates this. The whole window should be red, but just a corner is, due to the incorrect scissoring.

To compile:

gcc -Wall -O0 -g -o test SDL-test-broken-window-position-opengl.c sdl-config --cflags --libs -framework OpenGL

--ryan.

On 2008-09-22 05:59:44 +0000, Ryan C. Gordon wrote:

(Actually, this isn't just the viewport and scissor, it also becomes the mouse area...you get SDL_APPMOUSEFOCUS events as you move in and out of that viewport.)

--ryan.

On 2009-05-26 23:30:45 +0000, Rene Dudfield wrote:

hi,

it seems that SDL_VIDEO_WINDOW_POS doesn't work on OSX.

If I move it off the x coordinate, then shows white screen on the left side of the window by the same amount. This is with x=300, y=0 for example -- there is white on the window for 300 pixels across.

Moving it on the y axis I get a bus error.

with last stable... SDL 1.2.13, OSX 10.5.7

Tested with pygame 1.9.0pre.

On 2009-05-27 00:23:45 +0000, Rene Dudfield wrote:

hi again,

It looks like the parent window isn't moved with the main SDL window.

The bus error crashes with SDL_FillRect if I change the y coordinate.

This is the file where SDL_VIDEO_WINDOW_POS is inspected...
src/video/quartz/SDL_QuartzVideo.m

It looks like the patch addresses it using some carbon calls:
http://www.nabble.com/-patch--OS-X-carbon-SDL_WINDOWID-support-td6457591.html

Haven't tried the patch though.

export SDL_VIDEO_WINDOW_POS="0,0" works ok, since then the parent window doesn't need to be modified... as it starts off at 0,0 by default.

ps. SDL_VIDEO_CENTERED=1 works fine.

On 2009-09-13 16:33:11 +0000, Ryan C. Gordon wrote:

Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.

On 2009-09-29 06:08:15 +0000, Ryan C. Gordon wrote:

Fixed in svn revision # 4890.

--ryan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant