summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland.h
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2017-08-22 15:38:26 +0200
committerAdam Jackson <ajax@redhat.com>2017-09-13 11:51:10 -0400
commit82df2ce38c560915f8c6574052bd56215b649072 (patch)
tree2a7ac74a2c42366ebeae5757be78314806e33736 /hw/xwayland/xwayland.h
parent1089d5d518a315963a8cda6c7d47a0ce09de0979 (diff)
xwayland: Avoid repeatedly looping through window ancestor chain
Calling xwl_window_from_window means looping through the window ancestor chain whenever it is called on a child window or on an automatically redirected window. Since these properties and the potential ancestor's xwl_window are constant between window realization and unrealization, we can omit the looping by always putting the respective xwl_window in the Window's private field on its realization. If the Window doesn't feature an xwl_window on its own, it's the xwl_window of its first ancestor with one. Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'hw/xwayland/xwayland.h')
-rw-r--r--hw/xwayland/xwayland.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index 6d3edf33b..3adee82fa 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -309,7 +309,7 @@ RRModePtr xwayland_cvt(int HDisplay, int VDisplay,
void xwl_pixmap_set_private(PixmapPtr pixmap, struct xwl_pixmap *xwl_pixmap);
struct xwl_pixmap *xwl_pixmap_get(PixmapPtr pixmap);
-struct xwl_window *xwl_window_from_window(WindowPtr window);
+struct xwl_window *xwl_window_of_top(WindowPtr window);
Bool xwl_shm_create_screen_resources(ScreenPtr screen);
PixmapPtr xwl_shm_create_pixmap(ScreenPtr screen, int width, int height,