[vlc-devel] Mouse hiding
robux4 at gmail.com
Tue Aug 8 11:38:59 CEST 2017
On Mon, Aug 7, 2017 at 5:20 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le maanantaina 7. elokuuta 2017, 14.59.29 EEST Steve Lhomme a écrit :
>> I'm trying to understand how mouse hiding is supposed to work to fix #17819.
>> Right now it's broken on Windows and maybe OS X as well.
>> Is it always the responsibility of the vout_window_t to hide the mouse?
> This is the description from Thomas:
> | core: vout: add VOUT_WINDOW_HIDE_MOUSE
> | A window can now hide the mouse cursor. If this control is not implemented
> | by a "vout window" module, the control will be sent to the "vout display"
> | module.
> I believe that it is meant to be either the window or the display, but not
> both. Indeed, I can´t really imagine how the responsibility could functionally
> be shared.
>> I suppose that's why VOUT_DISPLAY_HIDE_MOUSE is deprecated ?
> As of last week, I think that both VOUT_DISPLAY_HIDE_MOUSE and
> VOUT_WINDOW_HIDE_MOUSE should be deprecated. The component tracking mouse
> movement is in better position to run the hiding timer than the video output
> core thread.
Well, IMO VOUT_DISPLAY_HIDE_MOUSE is broken by design. To
enable/disable the mouse the core has its own variable/timer and a
flag to do the switch when necessary. But with only a HIDE message,
it's left to interpretation when it should be shown again. And that
will be inconsistent with the state of the core. So either we fix the
design or we remove it.
The problem on Windows is that the vout creates its own window (HWND)
with it's own mouse cursor. I don't see a way to inherit the mouse
from the parent. So it has to manage it by itself. But it never does
since Qt only gets the order to hide/show the mouse. If I return an
error in Qt (we know for Win32 it has no effect) we fall back on the
VOUT_DISPLAY_HIDE_MOUSE mechanism. Except it's not compatible with the
way the core works (ie it decides when to show and hide).
> From the core, we only need a symbolic constant, probably in <vlc_mouse.h>, to
> convey a shared timeout value.
>> Right now it's not being called even though needs_hide_mouse is set because
>> vout_HideWindowMouse() is successful.
> According to my interpretation of Thomas´ commit message, this is intended.
>> In the Qt interface MainInterface::setHideMouse() is called properly
>> with show/hide but it has absolutely zero impact. Is it the same on
>> other platform than Windows?
> It works fine on X11. I have not tested on Wayland.
> But in those two windowing systems, the vout display plugins do not perform
> any mouse handling, or in fact any input device handling at all.
>> Maybe a regression of Qt 5 ? I could
>> call win32 ShowCursor() in there and it works but it seems dirty.
> I don´t know that it would be a regression. The code was added in 3.0 cycle.
> The most obvious potential culprit to me would be -interference with- the
> common code in Win32 display plugins.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel