Merge pull request #4033 from blino/wayland-fullscreen

Add fullscreen support in Wayland clients
This commit is contained in:
akallabeth 2017-07-07 09:14:15 +02:00 committed by GitHub
commit 59737d08ff
2 changed files with 17 additions and 0 deletions

View File

@ -173,6 +173,7 @@ static BOOL wl_post_connect(freerdp* instance)
if (!window)
return FALSE;
UwacWindowSetFullscreenState(window, NULL, instance->context->settings->Fullscreen);
UwacWindowSetTitle(window, "FreeRDP");
instance->update->BeginPaint = wl_begin_paint;
instance->update->EndPaint = wl_end_paint;
@ -180,6 +181,9 @@ static BOOL wl_post_connect(freerdp* instance)
gdi->width * gdi->height * 4);
UwacWindowAddDamage(context->window, 0, 0, gdi->width, gdi->height);
context->haveDamage = TRUE;
freerdp_keyboard_init(instance->context->settings->KeyboardLayout);
return wl_update_content(context);
}

View File

@ -682,6 +682,19 @@ UwacReturnCode UwacWindowSetFullscreenState(UwacWindow* window, UwacOutput* outp
xdg_surface_unset_fullscreen(window->xdg_surface);
}
}
else if (window->shell_surface)
{
if (isFullscreen) {
wl_shell_surface_set_fullscreen(window->shell_surface,
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0,
output ? output->output : NULL);
}
else
{
wl_shell_surface_set_toplevel(window->shell_surface);
}
}
return UWAC_SUCCESS;
}