summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.h
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2013-08-23 11:29:09 +0200
committerAlexander Preisinger <alexander.preisinger@gmail.com>2013-08-25 22:46:26 +0200
commit8fd274ea3bc6b102f8931e4a2e72bca4d759d048 (patch)
treecd25c53caaa9c7306adb99de492e8d9ec29a1a53 /video/out/wayland_common.h
parentc2cb85851ff2b4050b0564d442f57d44084fafc1 (diff)
downloadmpv-8fd274ea3bc6b102f8931e4a2e72bca4d759d048.tar.bz2
mpv-8fd274ea3bc6b102f8931e4a2e72bca4d759d048.tar.xz
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.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r--video/out/wayland_common.h17
1 files changed, 5 insertions, 12 deletions
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 {