Page 1 of 1

Issues: Moving the player window & Always on top

Posted: 15 Dec 2011 16:52
by Shield
Hello,

I'm considering the VLC media player to be my new .. well, media player :? but unfortunately, I'm currently struggling with two usability issues.

First, I can't drag the player by clicking right into the video, I have to click on the title bar instead (or certain parts of the skin respectively) in order to move the player around. This issue has already been mentioned here, however, the answer
If you click on the video, VLC will report a click to the multimedia pipeline. This is required for DVD and MKV menus, and for a few video filters.
... is quite unsatisfying. A player knows what type of media it's currently playing and which filters are active, so there's no need for the multimedia pipeline to generally hijack the mouse click for the price of usability.

The second issue is related to the 'Always on top' setting, which makes even the players other windows (e.g. settings, media info etc.) open up behind the video window ! :shock: Not sure if this a bug that only applies to the Windows (7, 64-bit) version, otherwise, this behaviour is not very well thought-out and definitely needs some attention.

Thank you for any response ! :)

Re: Issues: Moving the player window & Always on top

Posted: 15 Dec 2011 18:33
by Rémi Denis-Courmont
No, a player does not know. I think I know VLC internal architecture better than you do.

Re: Issues: Moving the player window & Always on top

Posted: 15 Dec 2011 21:47
by Shield
I never argued the converse. :wink:

But I have a copy of Media Player Classic here, and that one can even tell a DVDs main menu apart from the movie itself, dis-/allowing the concerning drag operation dynamically... therefore, if the internal architecture of VLC media player does not know what the player is actually doing, than that's the reason for the issue....

Any statement concerning the odd Always on top-behaviour ? Is it a bug, or do I miss a certain setting .. ??

Re: Issues: Moving the player window & Always on top

Posted: 16 Dec 2011 15:05
by Shield
Forgot to mention that this only happens if a skin is in use (no matter which one). So it looks like a bug to me .... ?!

Re: Issues: Moving the player window & Always on top

Posted: 17 Dec 2011 14:45
by Jean-Baptiste Kempf
First, I can't drag the player by clicking right into the video, I have to click on the title bar instead (or certain parts of the skin respectively) in order to move the player around. This issue has already been mentioned here, however, the answer
Dragging the player from another part than the title bar is against almost HI Guidelines.
The second issue is related to the 'Always on top' setting, which makes even the players other windows (e.g. settings, media info etc.) open up behind the video window ! :shock: Not sure if this a bug that only applies to the Windows (7, 64-bit) version, otherwise, this behaviour is not very well thought-out and definitely needs some attention.
Fixed for effects, preferences in VLC 1.2, at least.

Re: Issues: Moving the player window & Always on top

Posted: 17 Dec 2011 16:15
by Shield
Thank you for your reply :)
Fixed for effects, preferences in VLC 1.2, at least.
That is very good to hear!
Dragging the player from another part than the title bar is against almost HI Guidelines.
I understand, but here are three facts that might be worth thinking about. First, the consequence is that every skin has to have a title bar (even if it's not on top), and that's against something else, the main idea behind skins: Freedom of layout and design. Second, I'm quite sure that VLC is the only media player I installed during the last week that can be dragged by the title bar only - until it's skinned. And that's the third and maybe most important fact: As soon as the interface design is given into the hands of the users, the player becomes much more draggable. Nearly any skin welcomes the mouse within the control-surrounding areas as well, so that the window can be dragged around. Don't you think that this would include the video area as well? If VLC only would allow to ? Since developement is all about breaking rules anyway, how much worth is a guideline when users verifiably want something else ... ?

My 2 cents.

Re: Issues: Moving the player window & Always on top

Posted: 17 Dec 2011 22:06
by Rémi Denis-Courmont
Users verifiably wants DVD menus to work. Thank you for destroying your own point.

Re: Issues: Moving the player window & Always on top

Posted: 17 Dec 2011 23:37
by Shield
Thank you for taking attention to the point
Media Player Classic (...) can even tell a DVDs main menu apart from the movie itself, dis-/allowing the concerning drag operation dynamically
And here's another approach, a slightly modified version of the AutoHotKey demo script 'Easy Window Dragging' which is written by a guy called Jonny, so all credits to him. The script allows dragging VLC by its video area as well as use a DVDs menu without even altering the configuration of VLC at all. It's very much beta and far from thoroughly tested, in fact I faliled to develope it any further because there was no way to detect the controls of VLCs skinned interface (which is necessary in order to use sliders like the volume control instead of having the whole player becoming moved around). However, for a draft it deals with the main issue quite well.

Code: Select all

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. ~LButton:: ; Catch left-click MouseGetPos ,,,WindowID ; Fetch the id of the window below the pointer ... WinGet ,Executable,ProcessName,ahk_id %WindowID% ; .. in order to make sure it belongs to VLC media player if Executable = vlc.exe { CoordMode, Mouse ; Switch to screen/absolute coordinates. MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin% WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin% if EWD_WinState = 0 ; Only if the window isn't maximized SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it. } return EWD_WatchMouse: GetKeyState, EWD_LButtonState, LButton, P if EWD_LButtonState = U ; Button has been released, so drag is complete. { SetTimer, EWD_WatchMouse, off return } GetKeyState, EWD_EscapeState, Escape, P if EWD_EscapeState = D ; Escape has been pressed, so drag is cancelled. { SetTimer, EWD_WatchMouse, off WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY% return } ; Otherwise, reposition the window to match the change in mouse coordinates ; caused by the user having dragged the mouse: CoordMode, Mouse MouseGetPos, EWD_MouseX, EWD_MouseY WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin% SetWinDelay, -1 ; Makes the below move faster/smoother. WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY EWD_MouseStartX := EWD_MouseX ; Update for the next timer-call to this subroutine. EWD_MouseStartY := EWD_MouseY return

Re: Issues: Moving the player window & Always on top

Posted: 15 Jan 2012 12:15
by premium
I could not get this to work with the left mouse button. I got it to work with the middle button. Why doesn't it work with the left one?

Re: Issues: Moving the player window & Always on top

Posted: 15 Jan 2012 13:00
by Shield
Sounds like something else is hooked up to the left button, preventing the script from handling the click event. Could be some mouse or anti-malware utility, another script, a drivers issue, etc ...

Re: Issues: Moving the player window & Always on top

Posted: 22 Jan 2012 23:56
by premium
If I have a global hotkey defined for the left button, how can I override it for VLC?

Re: Issues: Moving the player window & Always on top

Posted: 23 Jan 2012 14:58
by Shield
In case you have another AutoHotkey script running which already catches the left mouse button, it's best to melt both scripts into one in order to make the button work depending on the window which is below the pointer. You can does this prior to the hotkey definition (see examples here) or afterwards, like it's already done within the script. All you have to do is add what to do if the windows does NOT belong to VLC:

Code: Select all

if Executable = vlc.exe { ... } else { ... }
The code within the else-block has to be the one from the global hotkey you mentioned.

Re: Issues: Moving the player window & Always on top

Posted: 25 Jan 2012 07:40
by premium
Thanks Shield, that will work.

However, I think many programmers would expect a #IfWin directive to override the global hotkey.

Code: Select all

LButton:: MsgBox, Global hotkey - This is displayed if nothing else is defined Return #IfWinActive vlc MsgBox, VLC hotkey - This overrides the global hotkey Return

Re: Issues: Moving the player window & Always on top

Posted: 26 Jan 2012 12:12
by Shield
Your example won't work. The #IfWinActive-directive has to work as a precondition of a hotkeys definition. You also have to consider that the name of VLCs main window varies depending on the interface. This code will work with both the default and the skinned one:

Code: Select all

SetTitleMatchMode RegEx ; Makes sure that the script looks out for more than just one window name #IfWinNotActive (.*VLC media player|default name) ; See http://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm ~LButton:: tooltip This window does not belong to vlc player Return #IfWinActive (.*VLC media player|default name) ~LButton:: tooltip vlc player is here Return
In skinned mode, the main window of VLC is always called 'default name', which is why it might be a good idea to make it more distinctive using multiple criteria. Please also note the tilde in front of the LButton:: - it makes sure that the click event will be processed not only by the script, but also the active window.

Re: Issues: Moving the player window & Always on top

Posted: 03 Sep 2012 23:53
by spidgorny
Users verifiably wants DVD menus to work. Thank you for destroying your own point.
I have a suggestion: stop arguing which way is better and implement one more setting called "Drag window by clicking video (will break DVD menus)". This will make both people happy, including me who is never watching DVDs with VLC.

Additional argument is usability: modern users got used to dragging video like that with other media players and find it disappointing when it doesn't work with VLC. Let's make VLC less geeky and more user-friendly. I define usability as reacting exactly like users expect.

It's one of my two most wanted features together with VLC 2 always-on-top setting is not remembered. It works when setting manually, but not after restart. Could you at least implement a shortcut so this can be done quickly with a keyboard instead of fiddling with menu?

Re: Issues: Moving the player window & Always on top

Posted: 07 Sep 2012 17:48
by Jean-Baptiste Kempf
It's one of my two most wanted features together with VLC 2 always-on-top setting is not remembered. It works when setting manually, but not after restart. Could you at least implement a shortcut so this can be done quickly with a keyboard instead of fiddling with menu?
Preferences allow you to do that.

Re: Issues: Moving the player window & Always on top

Posted: 07 Sep 2012 20:20
by spidgorny
Preferences allow you to do that.
I could not find the shortcut key:
Image

Could you be more specific?

Re: Issues: Moving the player window & Always on top

Posted: 10 Sep 2012 13:36
by Jean-Baptiste Kempf
Preferences allow you to be always on top all the time.

Re: Issues: Moving the player window & Always on top

Posted: 25 Sep 2012 19:32
by spidgorny
Preferences allow you to be always on top all the time.
True, there's such setting, but like I said before:
VLC 2 always-on-top setting is not remembered.
Reproducible:
1. Set always on the top in the settings. This has an effect and works.
2. Quit VLC.
3. Start playing any video with VLC.
4. Notice that it's NOT always on the top, although the setting remains set.

To fix:
5. Unset always on the top setting.
6. Set always on the top again.

This is definitely a bug, IMHO.
System: Windows 7 64bit, VLC 2.0.2.

Re: Issues: Moving the player window & Always on top

Posted: 26 Sep 2012 12:10
by Jean-Baptiste Kempf
Register the bug, then.