[MPlayer-dev-eng] GUI: Strange code in gui/ui/main.c [2]

Ingo Brückl ib at wupperonline.de
Sat Jan 26 17:34:15 CET 2013


Hans-Dieter Kosch wrote on Sat, 26 Jan 2013 03:53:28 +0100:

> I discovered strange code in gui/ui/main.c, lines 128++:

The uiMainMouse() code seems to be among the oldest, most confusing code
parts of the GUI - probably often extended during the early time of GUI
devolpment when the GUI got new features. As long as we don't run into a bug,
I don't care about it until it's time to completely check it. Unfortunately,
if you start checking somewhere (I came from guiInit() a few weeks ago BTW),
you'll be drawn into all different parts of the code (I had to turn to the ws
X stuff which made me come across the stuff for the four different windows
then). Before you know it, you have a bunch of pending and connected issues
and you are miles away from what you've intended to check in the first place
(and hours beyond the time you've estimated, neglecting your other duties).

To make a long story short, yes, this part of code is complete nonsense.

> I have no idea, what's intended there; maybe, there's a bug buried?

You may get a nice optical feature when disabling a button (for short time)
after being pressed, but the current code isn't responsive enough to take
advantage of it. I'll comment it, until I turn towards mouse handling.

Ingo


More information about the MPlayer-dev-eng mailing list