Exemplo n.º 1
0
void View::set_title(const char* title)
{
  bool do_set_title = true;
  view_sync.enter();
  if (output_id < 0)
    do_set_title = false;
  view_sync.leave();
  if (do_set_title)
    set_view_title(output_id, title);
}
Exemplo n.º 2
0
void View::set_title(const char* title)
{
  bool do_set_title = true;
  
  // Always set the title property.
  this->title = title;
  
  view_sync.enter();
  if (output_id < 0)
    // If the window does not exist, do nothing else and wait until it is created.
    do_set_title = false;
  
  view_sync.leave();
  
  // If the window already exists, show the new title in its header.
  if (do_set_title)
    set_view_title(output_id, title);
}