]> git.sesse.net Git - vlc/commitdiff
Emit a fullscreen toggle action on double click
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 10 Feb 2010 18:17:31 +0000 (20:17 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 10 Feb 2010 18:17:31 +0000 (20:17 +0200)
If we just set "fullscreen" on the emitting video output, the fullscreen
mode will not survive a change of video output.
With this hack, the hotkeys interface can handle the request correctly.
On the other hand, the hotkeys can also handle it incorrectly (e.g. if
inside LibVLC). It all comes down to the fact that key actions are per
instance, when most of them should be per-input.

src/video_output/event.h

index 6614d5d9584c75c9f2dbec036f88b68337d66fc1..bbc7812c4ae6cc466d8c9e4311e113f8fa26f40a 100644 (file)
@@ -85,7 +85,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)
 {