[2/4] winex11: Send XEMBED_REQUEST_FOCUS request for embedded windows
Alexandre Julliard
julliard at winehq.org
Mon Nov 11 12:46:11 CST 2013
Sebastian Lackner <sebastian at fds-team.de> writes:
> @@ -1140,6 +1140,22 @@ void make_window_embedded( struct x11drv_win_data *data )
> set_xembed_flags( data, (data->mapped || data->embedder) ? XEMBED_MAPPED : 0 );
> }
>
> +/***********************************************************************
> + * get_ancestor_root_embedded
> + */
> +HWND get_ancestor_root_embedded( HWND hwnd )
> +{
> + HWND parent;
> + if (!hwnd) return NULL;
> + for (;;)
> + {
> + parent = GetAncestor(hwnd, GA_PARENT);
> + if (!parent || parent == GetDesktopWindow() || (Window)GetPropA( parent, foreign_window_prop ))
> + break;
> + hwnd = parent;
> + }
> + return hwnd;
> +}
It would be better to check for the embedded flag instead of retrieving
a bunch of window properties.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list