﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
452,SDL video resize event is off by one,pulkomandy,scottmc,"Here's a patch done as part of GCI for fixing a little, but very annoying, SDL issue.
This is reported as sdl bug #1031 and may be uptreamed someday, but for the time being, I record it here.

The patch is done by Daniel Marth.

{{{
The problem was that in the file ""./src/video/bwindow/SDL_sysevents.cc"" the method ""SDL_BWin::DirectConnected"" called ""SDL_PrivateResize"" with wrong parameters (1 pixel too much for width and height).

Before:

void SDL_BWin::DirectConnected(direct_buffer_info *info) {
    switch (info->buffer_state & B_DIRECT_MODE_MASK) {
        case B_DIRECT_START:
        case B_DIRECT_MODIFY:
            {
                int32 width = info->window_bounds.right -
                    info->window_bounds.left + 1;
                int32 height = info->window_bounds.bottom -
                    info->window_bounds.top + 1;
                SDL_PrivateResize(width, height);
                break;
            }
        default:
            break;
    }
}

After:

void SDL_BWin::DirectConnected(direct_buffer_info *info) {
    switch (info->buffer_state & B_DIRECT_MODE_MASK) {
        case B_DIRECT_START:
        case B_DIRECT_MODIFY:
            {
                int32 width = info->window_bounds.right -
                    info->window_bounds.left;
                int32 height = info->window_bounds.bottom -
                    info->window_bounds.top;
                SDL_PrivateResize(width, height);
                break;
            }
        default:
            break;
    }
}
}}}",defect,new,normal,,media-libs/libsdl,,normal,,,
