From fd429eb46f18d643a440acaa624c497a8d25a15b Mon Sep 17 00:00:00 2001 From: David Sundstrom Date: Mon, 21 May 2012 16:43:26 -0500 Subject: [PATCH] Tooltips should not be listed when remapped --- client/X11/xf_window.c | 19 +++++++++++++------ include/freerdp/rail/window.h | 1 - 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 2a3a0e1ce..b08aaba37 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -232,12 +232,12 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st { window->is_transient = true; xf_SetWindowUnlisted(xfi, window); - window_type = xfi->_NET_WM_WINDOW_TYPE_POPUP; } else if (style & WS_POPUP) { /* this includes dialogs, popups, etc, that need to be full-fledged windows */ + window->is_transient = true; window_type = xfi->_NET_WM_WINDOW_TYPE_DIALOG; xf_SetWindowUnlisted(xfi, window); } @@ -416,8 +416,8 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, (uint32) window->handle, window->left, window->top, window->right, window->bottom, window->width, window->height, wnd->windowId); - xf_SetWindowDecorations(xfi, window, window->decorations); - xf_SetWindowStyle(xfi, window, wnd->style, wnd->extendedStyle); + memset(&gcv, 0, sizeof(gcv)); + window->gc = XCreateGC(xfi->display, window->handle, GCGraphicsExposures, &gcv); class_hints = XAllocClassHint(); @@ -445,11 +445,14 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, ColormapChangeMask | OwnerGrabButtonMask; XSelectInput(xfi->display, window->handle, input_mask); + + xf_SetWindowDecorations(xfi, window, window->decorations); + xf_SetWindowStyle(xfi, window, wnd->style, wnd->extendedStyle); + xf_ShowWindow(xfi, window, WINDOW_SHOW); + XMapWindow(xfi->display, window->handle); - memset(&gcv, 0, sizeof(gcv)); - window->gc = XCreateGC(xfi->display, window->handle, GCGraphicsExposures, &gcv); - + // Move doesn't seem to work until window is mapped. xf_MoveWindow(xfi, window, x, y, width, height); return window; @@ -611,6 +614,10 @@ void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state) case WINDOW_SHOW: XMapWindow(xfi->display, window->handle); + if (window->is_transient) + { + xf_SetWindowUnlisted(xfi, window); + } break; } diff --git a/include/freerdp/rail/window.h b/include/freerdp/rail/window.h index 43444bb3f..87eeb2318 100644 --- a/include/freerdp/rail/window.h +++ b/include/freerdp/rail/window.h @@ -43,7 +43,6 @@ struct rdp_window rdpWindow* next; uint32 windowId; uint32 ownerWindowId; - rdpWindow* ownerWindow; uint32 style; uint32 extendedStyle; uint8 showState;