Advertisement
Vultraz

Untitled

Jul 28th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. bool is_in_dialog()
  2. {
  3.     // No windows at all,
  4.     if(open_window_stack.empty()) {
  5.         //std::cerr << "OWS empty" << std::endl;
  6.         return false;
  7.     }
  8.  
  9.     window* w = open_window_stack.back();
  10.     assert(w);
  11.  
  12.     if(w->mode() == window::modal) {
  13.         std::cerr << "window modal" << std::endl;
  14.         return true;
  15.     }
  16.  
  17.     return w->get_distributor().keyboard_focus() != nullptr;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement