diff --git a/present/present_priv.h b/present/present_priv.h index aea4ad52e..ba9d89434 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 ae56f9032..0f881c0c3 100644 --- a/present/present_screen.c +++ b/present/present_screen.c @@ -21,6 +21,8 @@ */ #include +#include "dix/screen_hooks_priv.h" + #include "present_priv.h" int present_request; @@ -86,10 +88,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(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr window) { - 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); @@ -112,13 +113,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; } /* @@ -183,7 +177,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); + wrap(screen_priv, screen, ConfigNotify, present_config_notify); wrap(screen_priv, screen, ClipNotify, present_clip_notify);