Sebastian Lackner sebastian@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.