summaryrefslogtreecommitdiffstats
path: root/video/out/vo_wayland.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-27 21:33:11 +0200
committerwm4 <wm4@nowhere>2014-07-27 21:33:11 +0200
commit89391e7c949216d7edec461e9bb2cb6c787475c6 (patch)
tree0607c4609ffe505f810403585d54c8fa233e164f /video/out/vo_wayland.c
parentbc6359313f55ef42e2e4737323844a224f17730b (diff)
downloadmpv-89391e7c949216d7edec461e9bb2cb6c787475c6.tar.bz2
mpv-89391e7c949216d7edec461e9bb2cb6c787475c6.tar.xz
vo: different hack for VOs which need to mangle mouse input
Follow up on commit 760548da. Mouse handling is a bit confusing, because there are at least 3 coordinate systems associated with it, and it should be cleaned up. But that is hard, so just apply a hack which gets the currently-annoying issue (VO backends needing access to the VO) out of the way.
Diffstat (limited to 'video/out/vo_wayland.c')
-rw-r--r--video/out/vo_wayland.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/video/out/vo_wayland.c b/video/out/vo_wayland.c
index e0cf143fa0..2abb2b534f 100644
--- a/video/out/vo_wayland.c
+++ b/video/out/vo_wayland.c
@@ -40,6 +40,7 @@
#include "sub/img_convert.h"
#include "common/msg.h"
+#include "input/input.h"
#include "wayland_common.h"
#include "wayland-version.h"
@@ -501,6 +502,8 @@ static bool resize(struct priv *p)
p->dst_w = p->dst.x1 - p->dst.x0;
p->dst_h = p->dst.y1 - p->dst.y0;
+ mp_input_set_mouse_transform(p->vo->input_ctx, &p->dst, NULL);
+
MP_DBG(wl, "resizing %dx%d -> %dx%d\n", wl->window.width,
wl->window.height,
p->dst_w,
@@ -898,15 +901,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
return VO_TRUE;
case VOCTRL_REDRAW_FRAME:
return redraw_frame(p);
- case VOCTRL_WINDOW_TO_OSD_COORDS:
- {
- // OSD is rendered into the scaled image
- float *c = data;
- struct mp_rect *dst = &p->dst;
- c[0] = av_clipf(c[0], dst->x0, dst->x1) - dst->x0;
- c[1] = av_clipf(c[1], dst->y0, dst->y1) - dst->y0;
- return VO_TRUE;
- }
case VOCTRL_SCREENSHOT:
{
struct voctrl_screenshot_args *args = data;
@@ -928,7 +922,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
const struct vo_driver video_out_wayland = {
.description = "Wayland SHM video output",
.name = "wayland",
- .caps = VO_CAP_EVIL_OSD,
.priv_size = sizeof(struct priv),
.preinit = preinit,
.query_format = query_format,