commit
d0d618fb76
@ -263,6 +263,7 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st
|
|||||||
xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, boolean decorations)
|
xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, boolean decorations)
|
||||||
{
|
{
|
||||||
xfWindow* window;
|
xfWindow* window;
|
||||||
|
XEvent xevent;
|
||||||
|
|
||||||
window = (xfWindow*) xzalloc(sizeof(xfWindow));
|
window = (xfWindow*) xzalloc(sizeof(xfWindow));
|
||||||
|
|
||||||
@ -308,8 +309,19 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height,
|
|||||||
XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32,
|
XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32,
|
||||||
PropModeReplace, (uint8*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
|
PropModeReplace, (uint8*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
|
||||||
|
|
||||||
|
if (xfi->parent_window)
|
||||||
|
XReparentWindow(xfi->display, window->handle, xfi->parent_window, 0, 0);
|
||||||
|
|
||||||
XSelectInput(xfi->display, window->handle, input_mask);
|
XSelectInput(xfi->display, window->handle, input_mask);
|
||||||
XMapWindow(xfi->display, window->handle);
|
XMapWindow(xfi->display, window->handle);
|
||||||
|
|
||||||
|
//NOTE: This must be done here to handle reparenting the window, so that we dont miss the event and hang waiting for the next one
|
||||||
|
/* wait for VisibilityNotify */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
XMaskEvent(xfi->display, VisibilityChangeMask, &xevent);
|
||||||
|
}
|
||||||
|
while (xevent.type != VisibilityNotify);
|
||||||
}
|
}
|
||||||
|
|
||||||
XStoreName(xfi->display, window->handle, name);
|
XStoreName(xfi->display, window->handle, name);
|
||||||
|
@ -309,19 +309,9 @@ void xf_create_window(xfInfo* xfi)
|
|||||||
xfi->window = xf_CreateDesktopWindow(xfi, win_title, width, height, xfi->decorations);
|
xfi->window = xf_CreateDesktopWindow(xfi, win_title, width, height, xfi->decorations);
|
||||||
xfree(win_title);
|
xfree(win_title);
|
||||||
|
|
||||||
if (xfi->parent_window)
|
|
||||||
XReparentWindow(xfi->display, xfi->window->handle, xfi->parent_window, 0, 0);
|
|
||||||
|
|
||||||
if (xfi->fullscreen)
|
if (xfi->fullscreen)
|
||||||
xf_SetWindowFullscreen(xfi, xfi->window, xfi->fullscreen);
|
xf_SetWindowFullscreen(xfi, xfi->window, xfi->fullscreen);
|
||||||
|
|
||||||
/* wait for VisibilityNotify */
|
|
||||||
do
|
|
||||||
{
|
|
||||||
XMaskEvent(xfi->display, VisibilityChangeMask, &xevent);
|
|
||||||
}
|
|
||||||
while (xevent.type != VisibilityNotify);
|
|
||||||
|
|
||||||
xfi->unobscured = (xevent.xvisibility.state == VisibilityUnobscured);
|
xfi->unobscured = (xevent.xvisibility.state == VisibilityUnobscured);
|
||||||
|
|
||||||
XSetWMProtocols(xfi->display, xfi->window->handle, &(xfi->WM_DELETE_WINDOW), 1);
|
XSetWMProtocols(xfi->display, xfi->window->handle, &(xfi->WM_DELETE_WINDOW), 1);
|
||||||
|
@ -479,7 +479,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
|||||||
return FREERDP_ARGS_PARSE_FAILURE;
|
return FREERDP_ARGS_PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
settings->parent_window_xid = strtoul(argv[index], NULL, 16);
|
settings->parent_window_xid = strtol(argv[index], NULL, 0);
|
||||||
|
|
||||||
if (settings->parent_window_xid == 0)
|
if (settings->parent_window_xid == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user