How in GTK 3 to block the closing of the window through the combination of the ALT + F4 key?

    1 answer 1

    Alt-F4 is a combination of keys intercepts the OS and sends a program shutdown signal to the program. Therefore, to control the "Alt-F4 shortcut" you need to manage the incoming signals. And here it depends on the OS in which you work, and not on GTK.

    • Tkinter has a protocol ("WM_DELETE_WINDOW", self.func_pass) . Through it, I referred to the function where the pass was written and it was not closed. Is there the same in GTK 3? - CockLobster
    • one
      there is no such possibility in GTK, but events from the GDK library can be processed there (Event DELETE) - Yaroslav