let create_window ?x ?y ?width ?height () =
  let o = new gui_window ?x ?y ?width ?height () in
  gui_windows := o :: !gui_windows;
  let w = o#window in
  ignore(w#connect#destroy (on_window_destroy o));
  ignore(w#event#connect#focus_in
           (fun _ -> active_window := Some o; false));
  w#show ();
  o