Could be a bad switch in the tumbler..............
..the drivers door tumbler has a micro switch in it to open the windows when using the slide in key, you turn and the the lock tumbler in the unlock position and they will roll down.
If the switch goes bad then this could cause the windows to roll down and open the sunroof depending on how long it shorts out for. There probably wont be a fault as the system is responding to the prolonged unlock request.
The other thing that can cause the switch to go bad is window tinters, they squeegee out the water from the tint and it runs down into the door over the switch causing it to short out.