[MPlayer-dev-eng] [PATCH] GUI: Activate potmeter

Hans-Dieter Kosch hdkosch at kabelbw.de
Wed Feb 19 00:36:59 CET 2014


Ingo Brückl wrote:
> Hans-Dieter Kosch wrote on Sun, 16 Feb 2014 23:04:35 +0100:
> 
>> The 'pressed' state of a 'potmeter' item is not initialised.
> 
> Agreed.
> 
>> By default it's 0 ('btnDisabled'), and the item is inactive.
> 
> A potmeter doesn't have a btnDisabled state. Actually,
> the pressed state of a potmeter is irrelevant, because
> they cannot be pressed.
> 
Cf. gui/skin/skin.c: line 619: in function item_hpotmeter():
     item->pressed   = btnReleased;

The 'item->pressed' is used in gui/ui/main.c, line 102:
     if ( ( guiApp.mainItems[i].pressed != btnDisabled )&&
to determine if an object under the mouse is enabled. If it's 'btnDisabled', 
then the object is ignored and the window is moved instead of shifting the pot 
when the mouse is pressed and dragged.

The symbolic names 'btn...' are confusing for a pot (from gui/app/app.h). And so 
is the struct member name 'pressed'.

>> Attached patch to fix.
> 
> To fix exactly what?
> 
See above.

Hans-Dieter


More information about the MPlayer-dev-eng mailing list