Пример #1
0
void xf_toggle_fullscreen(xfContext* xfc)
{
	Pixmap contents = 0;
	WindowStateChangeEventArgs e;

	xf_lock_x11(xfc, TRUE);

	contents = XCreatePixmap(xfc->display, xfc->window->handle, xfc->width, xfc->height, xfc->depth);

	XCopyArea(xfc->display, xfc->primary, contents, xfc->gc, 0, 0, xfc->width, xfc->height, 0, 0);
	XDestroyWindow(xfc->display, xfc->window->handle);

	xfc->fullscreen = (xfc->fullscreen) ? FALSE : TRUE;

	xf_create_window(xfc);

	XCopyArea(xfc->display, contents, xfc->primary, xfc->gc, 0, 0, xfc->width, xfc->height, 0, 0);
	XFreePixmap(xfc->display, contents);

	xf_unlock_x11(xfc, TRUE);

	EventArgsInit(&e, "xfreerdp");
	e.state = xfc->fullscreen ? FREERDP_WINDOW_STATE_FULLSCREEN : 0;
	PubSub_OnWindowStateChange(((rdpContext *) xfc)->pubSub, xfc, &e);
}
Пример #2
0
void xf_toggle_fullscreen(xfContext* xfc)
{
	WindowStateChangeEventArgs e;
	rdpContext* context = (rdpContext*) xfc;
	rdpSettings* settings = context->settings;

	xfc->fullscreen = (xfc->fullscreen) ? FALSE : TRUE;
	xfc->decorations = (xfc->fullscreen) ? FALSE : settings->Decorations;

	xf_SetWindowFullscreen(xfc, xfc->window, xfc->fullscreen);

	EventArgsInit(&e, "xfreerdp");
	e.state = xfc->fullscreen ? FREERDP_WINDOW_STATE_FULLSCREEN : 0;
	PubSub_OnWindowStateChange(context->pubSub, context, &e);
}