if (!appWindow)
return;
+ if (enabled)
+ xf_SetWindowStyle(xfc, appWindow, appWindow->dwStyle, appWindow->dwExStyle);
+ else
+ xf_SetWindowStyle(xfc, appWindow, 0, 0);
+
activate.windowId = appWindow->windowId;
activate.enabled = enabled;
xfc->rail->ClientActivate(xfc->rail, &activate);
UINT32 ex_style)
{
Atom window_type;
+ BOOL redirect = FALSE;
if ((ex_style & WS_EX_NOACTIVATE) || (ex_style & WS_EX_TOOLWINDOW))
{
+ redirect = TRUE;
appWindow->is_transient = TRUE;
xf_SetWindowUnlisted(xfc, appWindow->handle);
window_type = xfc->_NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
window_type = xfc->_NET_WM_WINDOW_TYPE_NORMAL;
}
+ {
+ /*
+ * Tooltips and menu items should be unmanaged windows
+ * (called "override redirect" in X windows parlance)
+ * If they are managed, there are issues with window focus that
+ * cause the windows to behave improperly. For example, a mouse
+ * press will dismiss a drop-down menu because the RDP server
+ * sees that as a focus out event from the window owning the
+ * dropdown.
+ */
+ XSetWindowAttributes attrs;
+ attrs.override_redirect = redirect ? True : False;
+ XChangeWindowAttributes(xfc->display, appWindow->handle, CWOverrideRedirect,
+ &attrs);
+ }
+
XChangeProperty(xfc->display, appWindow->handle, xfc->_NET_WM_WINDOW_TYPE,
XA_ATOM, 32, PropModeReplace, (BYTE*) &window_type, 1);
}