linuxmint / mint19.2-beta

BETA Bug Squah Rush
4 stars 4 forks source link

MATE: vlc loses input focus in fullscreen mode; fullscreen controller does not appear properly #74

Open waynec123 opened 5 years ago

waynec123 commented 5 years ago

Describe the bug A clear and concise description of what the bug is.

Two related bugs:

  1. When playing a video with vlc, in fullscreen mode ("f" command), vlc loses input focus when the mouse is moved, causing it to ignore keyboard commands until a mouse click restores input focus.
  2. The vlc fullscreen controller is supposed to appear on the screen when the mouse is moved, stay there while the mouse is moving, and go away when the mouse is stationary; instead, it appears very briefly when the mouse stops moving, and only stays visible if you then manage to do a little dance with the mouse in the moment it appears.

To Reproduce Steps to reproduce the behavior (keyboard focus issue):

  1. Play any video with the vlc player.
  2. Use the "f" keyboard command to put vlc into fullscreen mode. Do not use the F11 "Fullscreen Interface" command.
  3. Before moving the mouse, notice that various keyboard command such as Space (Pause/Play), and arrow keys to move around in the video, work.
  4. Move the mouse a bit.
  5. Now notice that keyboard commands no longer work; vlc seems to have lost input focus.
  6. Click with the mouse; input focus is restored, keyboard commands work, until the next time you move the mouse.

Expected behavior A clear and concise description of what you expected to happen.

Keyboard commands should always work in fullscreen mode.

To Reproduce Steps to reproduce the behavior (fullscreen controller not appearing issue):

  1. Play any video with the vlc player.
  2. Use the "f" keyboard command to put vlc into fullscreen mode. Do not use the F11 "Fullscreen Interface" command.
  3. Move the mouse; notice that there is a slight flicker, no fullscreen controller interface appears at the bottom of the screen.
  4. Stop moving the mouse. A fullscreen controller interface appears very briefly at the bottom of the screen. If you resume moving the mouse in the brief moment the interface is visible, it will stay visible as long as you keep the mouse moving; you can then move the cursor to the interface and use the controls on it. When the mouse cursor is on the visible fullscreen interface, keyboard commands will again function.

Expected behavior A clear and concise description of what you expected to happen. The vlc fullscreen controller is supposed to appear on the screen when the mouse is moved, stay there while the mouse is moving, and go away shortly after the mouse ceases moving (if the mouse has not been moved to the controller). If the mouse has been moved to the controller, it stays visible.

Frequency Does the issue happen:

Edition (Desktop environment): In which edition is this happening?

Live or post-install: Indicate if this is happening after the installation, or during the live session:

Locale: Paste the output of locale. LANG=en_CA.UTF-8 LANGUAGE=en_CA:en LC_CTYPE="en_CA.UTF-8" LC_NUMERIC="en_CA.UTF-8" LC_TIME="en_CA.UTF-8" LC_COLLATE="en_CA.UTF-8" LC_MONETARY="en_CA.UTF-8" LC_MESSAGES="en_CA.UTF-8" LC_PAPER="en_CA.UTF-8" LC_NAME="en_CA.UTF-8" LC_ADDRESS="en_CA.UTF-8" LC_TELEPHONE="en_CA.UTF-8" LC_MEASUREMENT="en_CA.UTF-8" LC_IDENTIFICATION="en_CA.UTF-8" LC_ALL=

Drivers: Paste the output of inxi -Gxx. Graphics: Device-1: NVIDIA GF116 [GeForce GTS 450 Rev. 2] vendor: Gigabyte driver: nvidia v: 390.116 bus ID: 01:00.0 chip ID: 10de:1245 Display: x11 server: X.Org 1.19.6 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa compositor: marco resolution: 1280x1024~60Hz OpenGL: renderer: GeForce GTS 450/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116 direct render: Yes

Note: the bug also occurs with the nouveau driver, before Driver Manager installs the nvidia 390 driver.

Additional context Add any other context about the problem here.

The issue only occurs with MATE. I tested a 19.2 Tina beta Cinnamon install, and vlc works as expected. In MATE, unselect "Enable software compositing window manager" in Window Preferences: causes the fullscreen controller to behave properly. The keyboard focus problem remains. What could be the same issue was reported at https://forum.videolan.org/viewtopic.php?t=147281 There someone narrowed it down to a single commit in vlc, between version 3.0.3 and 3.0.4. The issue described there seemed to apply to both MATE and Cinnamon in Mint 19.1. I saw this same problem in 19.1 MATE, but have not tested a 19.1 Cinnamon install yet (I am a MATE user). The VLC developer did not see problem with the commit in question, and blamed it on MATE or the Gtk backend of Qt.

waynec123 commented 5 years ago

Further testing: With the current vlc 2.0.7, 19.1 Cinnamon works fine; 19.2 Beta Xfce also works fine. The problem seems to be confined to MATE. Unfortunately I can no longer downgrade vlc to any previous version, but I do know from previous testing that vlc 3.0.4 with 19.1 MATE had the problem, and vlc 3.0.3 did not. So it looks like that commit between vlc 3.0.3 and 3.0.4 stepped on a possible bug in in MATE which Cinnamon and Xfce do not seem to exhibit.

gm10 commented 5 years ago

Doesn't VLC have a bug like this every other version? It's their Qt UI taking focus away from the video and the keybinds only work while the video itself has focus. So you can work around it by either disabling "Show controls in full screen mode" or "Integrate video into interface" (restart VLC after changing that one, also not recommended because that mode is quite buggy itself).

Anyway, you should probably report this upstream to videolan, and there is already an existing report against MATE's marco window manager: https://github.com/mate-desktop/marco/issues/514. Which one of the two is the culprit at the end of the day I may not say.

waynec123 commented 5 years ago

I have been using MATE and VLC for a number of years, and haven't noticed this particular bug showing up before. Your workaround of disabling "Show controls in full screen mode" does work, as does keeping the mouse stationary in full screen mode, or simply clicking on the video to restore focus. What I would use the full screen controller for was to wave the mouse a bit to see the controller for a few seconds to see the current position and duration of the video, and to make large position changes by clicking on the progress bar. Unfortunately all of the above workarounds preclude that; my little dance technique with the mouse can bring up the controller, but is a bit finicky. My workaround when I first saw the problem a few months ago in 19.1 was to downgrade VLC to 3.0.3. That is no longer possible; older version are no longer visible in 19.x Synaptic. Could be due to the fact that a recent VLC release had a lot of security fixes; the old versions might have been removed from the 19.x repositories.

Thanks for the reference to the MATE / marco report; because I don't see the problem with Cinnamon or Xfce I suspect that there is either a bug, or a subtle difference in interpretation between the various window managers. (One of the marco developers admitted that "We do some strange things with certain keybindings and pointer events...". VLC may also be misinterpreting what is "supposed to happen" with the change that triggers the problem. In any event, it looks like this is definitely something beyond the scope of the BETA bug squashing rush. I will continue trying to troubleshoot at the marco#514 report, and on the two threads in the videolan forums which seem to be about the same issue. Thanks for your input!

gm10 commented 5 years ago

You're welcome. The bionic repository still has old vlc 3.0.1-3build1 if you want. I don't know why Synaptic wouldn't display it to you but you can always install via the command line. Or, of course, you could switch your window manager to Compiz.

And maybe MATE was safe from vlc focus bugs, but I know there have been a lot with exactly this situation. Here was a similar one against Cinnamon that was fixed in vlc 3.0.3, for example: https://trac.videolan.org/vlc/ticket/20825

The commit that may have broken it for Marco was submitted to fix a similar bug against most other window managers in 3.0.4: http://git.videolan.org/?p=vlc.git;a=commit;h=d60312d3ad4c4e27f3455b4f579999b826d3948c (just a guess because I never bothered compiling a version without that commit for testing - personally I'm using mpv which works just fine without all the baggage that vlc brings)

waynec123 commented 5 years ago

I managed to build vlc from the current release version sources. I then reversed the commit above, rebuilt, and lo and behold, the input focus and fullscreen controller issues go away. Haven't managed to test on Cinnamon or Xfce yet, since my first try at building a .deb that I could use on my other test installs didn't work. More homework to do in the whole package building area, I guess. It will be interesting to see whether reversing the commit breaks the other window managers. That should give the marco people something to work with, anyways.

gm10 commented 5 years ago

@waynec123, nice, I was quite sure it would be the culprit but good to see you could actually confirm.

Also good job with your first package! I don't know how you reversed the commit but can supply a patch file in debian/patches so dpkg-buildpackage does it on the fly. That way you can leave the source itself alone.