X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fvideo_output%2Fevent.h;h=948d317fd14f2902d8356425fa5021773339621b;hb=2c2f3856370e3480e4a61c263ec7917ace9fb60d;hp=bf9087c1633538230f9b6b2ce0585a5631c9a12a;hpb=180c722e1eb51f1ae6f59545b3d8dcb312e9ea5f;p=vlc diff --git a/src/video_output/event.h b/src/video_output/event.h index bf9087c163..948d317fd1 100644 --- a/src/video_output/event.h +++ b/src/video_output/event.h @@ -56,9 +56,7 @@ static inline void vout_SendEventKey(vout_thread_t *vout, int key) } static inline void vout_SendEventMouseMoved(vout_thread_t *vout, int x, int y) { - var_SetInteger(vout, "mouse-x", x); - var_SetInteger(vout, "mouse-y", y); - var_TriggerCallback(vout, "mouse-moved"); + var_SetCoords(vout, "mouse-moved", x, y); } static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) { @@ -67,9 +65,14 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) switch (button) { case MOUSE_BUTTON_LEFT: - var_SetBool(vout, "mouse-clicked", true); + { + /* FIXME? */ + int x, y; + var_GetCoords(vout, "mouse-moved", &x, &y); + var_SetCoords(vout, "mouse-clicked", x, y); var_SetBool(vout->p_libvlc, "intf-popupmenu", false); break; + } case MOUSE_BUTTON_CENTER: var_ToggleBool(vout->p_libvlc, "intf-show"); break;