X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fvideo_output%2Fevent.h;h=0cb1042c556d8a2ee639925774c994e2d800ec4e;hb=470ce70b69e1530173950a8dfd6d274a70caa7bc;hp=6614d5d9584c75c9f2dbec036f88b68337d66fc1;hpb=49334e07d05bb5e4770a95b8b4f57d84c192cdc9;p=vlc diff --git a/src/video_output/event.h b/src/video_output/event.h index 6614d5d958..0cb1042c55 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_SetBool(vout, "mouse-moved", true); + var_SetCoords(vout, "mouse-moved", x, y); } static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) { @@ -67,15 +65,26 @@ 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; case MOUSE_BUTTON_RIGHT: var_SetBool(vout->p_libvlc, "intf-popupmenu", true); break; + case MOUSE_BUTTON_WHEEL_UP: + vout_SendEventKey(vout, KEY_MOUSEWHEELUP); + break; + case MOUSE_BUTTON_WHEEL_DOWN: + vout_SendEventKey(vout, KEY_MOUSEWHEELDOWN); + break; } } static inline void vout_SendEventMouseReleased(vout_thread_t *vout, int button) @@ -85,7 +94,8 @@ static inline void vout_SendEventMouseReleased(vout_thread_t *vout, int button) static inline void vout_SendEventMouseDoubleClick(vout_thread_t *vout) { //vout_ControlSetFullscreen(vout, !var_GetBool(vout, "fullscreen")); - var_ToggleBool(vout, "fullscreen"); + //var_ToggleBool(vout, "fullscreen"); + var_SetInteger(vout->p_libvlc, "key-action", ACTIONID_TOGGLE_FULLSCREEN); } static inline void vout_SendEventMouseVisible(vout_thread_t *vout) {