Rework DirectFB code

Signed-off-by: Michael Steinert <mike.steinert@gmail.com>