From 2c6c842719b19c0c71c188e7337f15bb60f2585c Mon Sep 17 00:00:00 2001 From: Alexander Preisinger Date: Tue, 7 May 2013 20:51:09 +0200 Subject: wayland: reworked resizing This fixes 2 bugs: * Resizing very fast breaks the aspect of the window and the width and height don't match with the video anymore * Pressing 'f' for fullscreen very fast can overwrite the backup variables for the previous width and height. Also includes a better aspect calculation with fluid resizing. --- video/out/wayland_common.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'video/out/wayland_common.h') diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index 9c03dca7e5..d5259242bf 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -35,6 +35,8 @@ enum vo_wayland_window_type { }; struct vo; +struct vo_wayland_state; + struct vo_wayland_output { uint32_t id; /* unique name */ @@ -81,17 +83,23 @@ struct vo_wayland_window { int32_t p_width; int32_t p_height; - int32_t pending_width; - int32_t pending_height; - uint32_t edges; - int resize_needed; - struct wl_surface *surface; struct wl_shell_surface *shell_surface; - int events; /* mplayer events */ + int events; /* mplayer events (VO_EVENT_RESIZE) */ enum vo_wayland_window_type type; /* is fullscreen */ + + /* Because the egl windows have a special resize windw function we have to + * register it first before doing any resizing. + * This makes us independet from the output driver */ + void (*resize_func) (struct vo_wayland_state *wl, + uint32_t edges, + int32_t width, + int32_t height, + void *user_data); + + void *resize_func_data; }; struct vo_wayland_input { -- cgit v1.2.3