Fixed process_reparent()

This commit is contained in:
Tomas Frydrych 2008-10-22 14:40:06 +01:00
parent be11a6bf72
commit 275cccb136

View File

@ -1355,21 +1355,23 @@ process_reparent (Mutter *compositor,
MetaWindow *window) MetaWindow *window)
{ {
MetaScreen *screen; MetaScreen *screen;
MutterWindow *mw;
screen = meta_display_screen_for_root (compositor->display, event->parent); screen = meta_display_screen_for_root (compositor->display, event->parent);
if (screen != NULL) if (!screen)
{ return;
meta_verbose ("reparent: adding a new window 0x%x\n",
(guint)event->window); mw = find_window_for_screen (screen, event->window);
add_win (screen, window, event->window);
} if (mw)
else
{ {
meta_verbose ("reparent: destroying a window 0%x\n", meta_verbose ("reparent: destroying a window 0%x\n",
(guint)event->window); (guint)event->window);
destroy_win (compositor->display, event->window); destroy_win (compositor->display, event->window);
} }
add_win (screen, window, event->window);
} }
static void static void