diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index cb40a747d..e40ea73e6 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -334,8 +334,6 @@ void xf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt) } else if (brush->style == GDI_BS_PATTERN) { - printf("pattern bpp:%d\n", brush->bpp); - if (brush->bpp > 1) { pattern = xf_bitmap_new(xfi, 8, 8, brush->bpp, brush->data); diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index e5d45f9cd..634b93cab 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -72,10 +72,7 @@ void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen) XMoveResizeWindow(xfi->display, window->handle, 0, 0, window->width, window->height); XMapRaised(xfi->display, window->handle); - //XGrabPointer(xfi->display, window->handle, True, 0, GrabModeAsync, GrabModeAsync, window->handle, 0L, CurrentTime); - //XGrabKeyboard(xfi->display, window->handle, False, GrabModeAsync, GrabModeAsync, CurrentTime); - //XSetInputFocus(xfi->display, window->handle, RevertToParent, CurrentTime); window->fullscreen = True; } } @@ -218,10 +215,8 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height) if (class_hints != NULL) { - if (name != NULL) - class_hints->res_name = name; - - class_hints->res_class = "freerdp"; + class_hints->res_name = "xfreerdp"; + class_hints->res_class = "xfreerdp"; XSetClassHint(xfi->display, window->handle, class_hints); XFree(class_hints); } @@ -237,6 +232,8 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height) XMapWindow(xfi->display, window->handle); } + XStoreName(xfi->display, window->handle, name); + return window; } diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 7c2879ae4..bb2c7ea12 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -204,7 +204,9 @@ void xf_toggle_fullscreen(xfInfo* xfi) contents = XCreatePixmap(xfi->display, xfi->window->handle, xfi->width, xfi->height, xfi->depth); XCopyArea(xfi->display, xfi->primary, contents, xfi->gc, 0, 0, xfi->width, xfi->height, 0, 0); + XDestroyWindow(xfi->display, xfi->window->handle); xfi->fullscreen = (xfi->fullscreen) ? False : True; + xf_post_connect(xfi->instance); XCopyArea(xfi->display, contents, xfi->primary, xfi->gc, 0, 0, xfi->width, xfi->height, 0, 0); XFreePixmap(xfi->display, contents); @@ -358,6 +360,7 @@ boolean xf_pre_connect(freerdp* instance) xfi->decoration = settings->decorations; xfi->remote_app = settings->remote_app; xfi->fullscreen = settings->fullscreen; + xfi->fullscreen_toggle = xfi->fullscreen; xf_detect_monitors(xfi, settings); @@ -405,7 +408,7 @@ boolean xf_post_connect(freerdp* instance) if (xfi->remote_app != True) { - xfi->window = xf_CreateDesktopWindow(xfi, "xfreerdp", xfi->width, xfi->height); + xfi->window = xf_CreateDesktopWindow(xfi, "FreeRDP", xfi->width, xfi->height); xf_SetWindowDecorations(xfi, xfi->window, xfi->decoration); diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index c4e12deef..4510e0c0b 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -112,6 +112,7 @@ struct xf_info }; void xf_toggle_fullscreen(xfInfo* xfi); +boolean xf_post_connect(freerdp* instance); #ifdef WITH_DEBUG_X11 #define DEBUG_X11(fmt, ...) DEBUG_CLASS(X11, fmt, ## __VA_ARGS__)