diff --git a/present/present_priv.h b/present/present_priv.h index 351f98621..a855039ce 100644 --- a/present/present_priv.h +++ b/present/present_priv.h @@ -165,7 +165,6 @@ struct present_screen_priv { ScreenPtr pScreen; CloseScreenProcPtr CloseScreen; ConfigNotifyProcPtr ConfigNotify; - DestroyWindowProcPtr DestroyWindow; ClipNotifyProcPtr ClipNotify; present_vblank_ptr flip_pending; diff --git a/present/present_screen.c b/present/present_screen.c index 0589b2ee9..770ebf7b5 100644 --- a/present/present_screen.c +++ b/present/present_screen.c @@ -85,10 +85,9 @@ present_free_window_vblank(WindowPtr window) /* * Hook the close window function to clean up our window private */ -static Bool -present_destroy_window(WindowPtr window) +static void +present_destroy_window(ScreenPtr pScreen, WindowPtr window, void *closure) { - Bool ret; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_window_priv_ptr window_priv = present_window_priv(window); @@ -111,13 +110,6 @@ present_destroy_window(WindowPtr window) free(window_priv); } - unwrap(screen_priv, screen, DestroyWindow); - if (screen->DestroyWindow) - ret = screen->DestroyWindow (window); - else - ret = TRUE; - wrap(screen_priv, screen, DestroyWindow, present_destroy_window); - return ret; } /* @@ -182,7 +174,9 @@ present_screen_priv_init(ScreenPtr screen) return NULL; wrap(screen_priv, screen, CloseScreen, present_close_screen); - wrap(screen_priv, screen, DestroyWindow, present_destroy_window); + + dixScreenHookWindowDestroy(screen, present_destroy_window, NULL); + wrap(screen_priv, screen, ConfigNotify, present_config_notify); wrap(screen_priv, screen, ClipNotify, present_clip_notify);