Flying a flag at half-mast following the death of the head of state is a common practice across the world. In the UK, such tributes honour rulers of allied nations on the monarch's command.
The flag originated in the 7th Century by the Romans but it was officially recognised as Wales' national flag in 1959 From Wales’ World Cup opener ... the dragon and its history.