diff --git a/tests/examples/overlay/gtk-videooverlay.c b/tests/examples/overlay/gtk-videooverlay.c
index e49092f..2fd58d4 100644
--- a/tests/examples/overlay/gtk-videooverlay.c
+++ b/tests/examples/overlay/gtk-videooverlay.c
@@ -93,7 +93,7 @@ int
 main (int argc, char **argv)
 {
   GdkWindow *video_window_xwindow;
-  GtkWidget *window, *video_window;
+  GtkWidget *window, *video_window, *headerbar;
   GstElement *pipeline, *src, *sink;
   gulong embed_xid;
   GstStateChangeReturn sret;
@@ -119,7 +119,12 @@ main (int argc, char **argv)
   g_signal_connect (G_OBJECT (window), "delete-event",
       G_CALLBACK (window_closed), (gpointer) pipeline);
   gtk_window_set_default_size (GTK_WINDOW (window), 320, 240);
-  gtk_window_set_title (GTK_WINDOW (window), "GstVideoOverlay Gtk+ demo");
+
+  headerbar = gtk_header_bar_new ();
+  gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (headerbar), TRUE);
+  gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar), "GstVideoOverlay Gtk+ demo");
+  gtk_widget_show (GTK_WIDGET (headerbar));
+  gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
 
   video_window = gtk_drawing_area_new ();
   gtk_widget_set_double_buffered (video_window, FALSE);
