xfreerdp: drawing of multiple RAIL windows

This commit is contained in:
Marc-André Moreau 2011-08-17 14:51:17 -04:00
parent 5f9d000227
commit c9917d3ca1
5 changed files with 23 additions and 4 deletions

View File

@ -121,6 +121,18 @@ boolean window_GetWorkArea(xfInfo* xfi)
return True;
}
void window_move(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height)
{
XWindowChanges changes;
changes.x = x;
changes.y = y;
changes.width = width;
changes.height = height;
XConfigureWindow(xfi->display, window->handle, CWX | CWY | CWWidth | CWHeight, &changes);
}
void window_show_decorations(xfInfo* xfi, xfWindow* window, boolean show)
{
Atom atom;
@ -145,7 +157,7 @@ void window_show_decorations(xfInfo* xfi, xfWindow* window, boolean show)
}
}
window->decorations = False;
window->decorations = show;
}
xfWindow* window_create(xfInfo* xfi, char* name)
@ -164,7 +176,7 @@ xfWindow* window_create(xfInfo* xfi, char* name)
window->fullscreen = False;
window->handle = XCreateWindow(xfi->display, RootWindowOfScreen(xfi->screen),
0, 0, xfi->width, xfi->height, 0, xfi->depth, InputOutput, xfi->visual,
xfi->workArea.x, xfi->workArea.y, xfi->width, xfi->height, 0, xfi->depth, InputOutput, xfi->visual,
CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap |
CWBorderPixel, &xfi->attribs);
@ -219,7 +231,7 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, int x, int y, int width, int height, char
XSizeHints* size_hints;
XClassHint* class_hints;
window->decorations = True;
window->decorations = False;
window->fullscreen = False;
window->handle = XCreateWindow(xfi->display, RootWindowOfScreen(xfi->screen),
@ -263,6 +275,8 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, int x, int y, int width, int height, char
memset(&gcv, 0, sizeof(gcv));
window->gc = XCreateGC(xfi->display, window->handle, GCGraphicsExposures, &gcv);
window->surface = XCreatePixmap(xfi->display, window->handle, window->width, window->height, xfi->depth);
window_move(xfi, window, x, y, width, height);
}
return window;

View File

@ -43,6 +43,7 @@ boolean window_GetCurrentDesktop(xfInfo* xfi);
boolean window_GetWorkArea(xfInfo* xfi);
void window_fullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen);
void window_move(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height);
void window_show_decorations(xfInfo* xfi, xfWindow* window, boolean show);
xfWindow* window_create(xfInfo* xfi, char* name);

View File

@ -75,7 +75,8 @@ void xf_end_paint(rdpUpdate* update)
XCopyArea(xfi->display, xfi->primary, xfi->window->handle, xfi->gc_default, x, y, w, h, x, y);
XFlush(xfi->display);
xf_rail_paint(xfi, update->rail);
if (xfi->remote_app == True)
xf_rail_paint(xfi, update->rail);
}
boolean xf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount)
@ -160,6 +161,7 @@ boolean xf_pre_connect(freerdp* instance)
xfi->mouse_motion = True;
xfi->decoration = settings->decorations;
xfi->remote_app = settings->remote_app;
window_GetWorkArea(xfi);

View File

@ -71,6 +71,7 @@ struct xf_info
xfWindow* window;
xfWorkArea workArea;
int current_desktop;
boolean remote_app;
GC gc_mono;
GC gc_default;

View File

@ -91,6 +91,7 @@ void window_list_create(rdpWindowList* list, WINDOW_ORDER_INFO* orderInfo, WINDO
else
{
window->prev = list->tail;
list->tail->next = window;
window->next = NULL;
list->tail = window;
}