[client,sdl] respect -decorations
Disable window borders if requested, fixes #9673
This commit is contained in:
parent
a7eeb8e1ba
commit
65da185275
@ -330,11 +330,19 @@ BOOL sdlDispContext::handle_window_event(const SDL_WindowEvent* ev)
|
||||
{
|
||||
WINPR_ASSERT(ev);
|
||||
|
||||
auto bordered = freerdp_settings_get_bool(_sdl->context()->settings, FreeRDP_Decorations)
|
||||
? SDL_TRUE
|
||||
: SDL_FALSE;
|
||||
auto window = SDL_GetWindowFromID(ev->windowID);
|
||||
if (window)
|
||||
SDL_SetWindowBordered(window, bordered);
|
||||
|
||||
switch (ev->event)
|
||||
{
|
||||
case SDL_WINDOWEVENT_HIDDEN:
|
||||
case SDL_WINDOWEVENT_MINIMIZED:
|
||||
gdi_send_suppress_output(_sdl->context()->gdi, TRUE);
|
||||
|
||||
return TRUE;
|
||||
|
||||
case SDL_WINDOWEVENT_EXPOSED:
|
||||
|
@ -727,6 +727,9 @@ static BOOL sdl_create_windows(SdlContext* sdl)
|
||||
window.offset_y = 0;
|
||||
}
|
||||
|
||||
if (!freerdp_settings_get_bool(settings, FreeRDP_Decorations))
|
||||
flags |= SDL_WINDOW_BORDERLESS;
|
||||
|
||||
window.window = SDL_CreateWindow(title, startupX, startupY, static_cast<int>(w),
|
||||
static_cast<int>(h), flags);
|
||||
if (!window.window)
|
||||
|
Loading…
Reference in New Issue
Block a user