Problems with Renderer Viewport

Hi there,

I am having a problem with Renderer Viewport.
By default it centers the viewport in the window, but I want to put it in a fixed position and add some native controls like buttons.
So I tried to prevent it from centering by doing this:

SDL_Rect viewport = {10,10,320,240}; // 320x240 viewport at position 10,10

when i get a SDL_WINDOWEVENT_RESIZED i call:
SDL_RenderSetViewport(renderer, &viewport);

but it doesnt work, the viewport now is aligned to the bottom left corner, which makes no sense.
I m doing it wrong?------
Another issue is that SDL_RenderClear clears the entire window area, not only the viewport, is that a bug or a feature?
this prevents me to see the buttons I added. ( I know the buttons are there because I changed the alpha of the window value using the native handler and I see the button there)

I am using OSX 10.7

any ideas?

Thanks.