Issues: Moving the player window & Always on top

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

Issues: Moving the player window & Always on top

Postby Shield » 15 Dec 2011 16:52

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 ! :)

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 15 Dec 2011 18:33

No, a player does not know. I think I know VLC internal architecture better than you do.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 15 Dec 2011 21:47

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 .. ??

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 16 Dec 2011 15:05

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 .... ?!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 17 Dec 2011 14:45

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.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 17 Dec 2011 16:15

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 17 Dec 2011 22:06

Users verifiably wants DVD menus to work. Thank you for destroying your own point.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 17 Dec 2011 23:37

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

premium
New Cone
New Cone
Posts: 3
Joined: 15 Jan 2012 12:11

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

Postby premium » 15 Jan 2012 12:15

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?

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 15 Jan 2012 13:00

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 ...

premium
New Cone
New Cone
Posts: 3
Joined: 15 Jan 2012 12:11

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

Postby premium » 22 Jan 2012 23:56

If I have a global hotkey defined for the left button, how can I override it for VLC?

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 23 Jan 2012 14:58

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.

premium
New Cone
New Cone
Posts: 3
Joined: 15 Jan 2012 12:11

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

Postby premium » 25 Jan 2012 07:40

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

Shield
New Cone
New Cone
Posts: 8
Joined: 15 Dec 2011 15:48
Operating System: Windows 7 x64
Location: Hamburg, Germany

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

Postby Shield » 26 Jan 2012 12:12

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.

spidgorny
New Cone
New Cone
Posts: 3
Joined: 03 Sep 2012 23:43

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

Postby spidgorny » 03 Sep 2012 23:53

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 07 Sep 2012 17:48

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.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

spidgorny
New Cone
New Cone
Posts: 3
Joined: 03 Sep 2012 23:43

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

Postby spidgorny » 07 Sep 2012 20:20

Preferences allow you to do that.
I could not find the shortcut key:
Image

Could you be more specific?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 10 Sep 2012 13:36

Preferences allow you to be always on top all the time.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

spidgorny
New Cone
New Cone
Posts: 3
Joined: 03 Sep 2012 23:43

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

Postby spidgorny » 25 Sep 2012 19:32

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 26 Sep 2012 12:10

Register the bug, then.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests