mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-04 15:23:32 +08:00
xfreerdp: drawing of multiple RAIL windows
This commit is contained in:
parent
5f9d000227
commit
c9917d3ca1
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -71,6 +71,7 @@ struct xf_info
|
||||
xfWindow* window;
|
||||
xfWorkArea workArea;
|
||||
int current_desktop;
|
||||
boolean remote_app;
|
||||
|
||||
GC gc_mono;
|
||||
GC gc_default;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user