Focussing on child dialog if clicked on other window (may be parent)

StackOverflow https://stackoverflow.com/questions/19096207

  •  29-06-2022
  •  | 
  •  

Вопрос

I have a main window and several other dialog windows which open from the main window on button clicks. When the user clicks on the main window while the child dialog window is opened, i want the focus to be set to child window. The user must first close the child and then click on main window. In Windows, it happens that it gives you sound as well as highlights the child window reminding the user that the child window is still opened and requires some action. How do i implement such functionality in gtkmm?

Это было полезно?

Решение

It sounds like you are just describing a modal window. If it fits your use case, there's a standard Gtk::Dialog. If you want a completely custom modal window, any window can be made modal.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top