From 8fd274ea3bc6b102f8931e4a2e72bca4d759d048 Mon Sep 17 00:00:00 2001 From: Alexander Preisinger Date: Fri, 23 Aug 2013 11:29:09 +0200 Subject: wayland/egl: rework resizing (again) Moves a good chunk of the resizing code to wayland_common.c. This makes it possible to share it with future video drivers. It doesn't resizit it immediatly, it calcutlates the new position and size and then shedules a resizing event. This removes the ugly callback and void pointer from the wayland data structure. --- video/out/wayland_common.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'video/out/wayland_common.h') diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index bb26f756a2..7e6f000c24 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -65,24 +65,17 @@ struct vo_wayland_state { struct { int32_t width; int32_t height; - int32_t p_width; // previous sizes for leaving fullscreen + int32_t p_width; // previous sizes for leaving fullscreen int32_t p_height; + int32_t sh_width; // sheduled width for resizing + int32_t sh_height; + int32_t sh_x; // x, y calculated with the drag edges for moving + int32_t sh_y; float aspect; struct wl_surface *surface; struct wl_shell_surface *shell_surface; int events; /* mplayer events (VO_EVENT_RESIZE) */ - - /* 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; } window; struct { -- cgit v1.2.3