1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
static gboolean hide_controls_on_iconify(GtkWidget *widget, GdkEventWindowState *event,GtkWidget *controls) { // The variable controls is a window.
if (event->type == GDK_WINDOW_STATE) {
if (event->changed_mask == GDK_WINDOW_STATE_ICONIFIED) {
gtk_widget_hide(controls) ;
is_pressed = FALSE ; // Variable to control if the controls are shown or hidden.
}
else {
if (! is_pressed) {
gtk_widget_show_all(controls) ;
is _pressed = TRUE ;
}
}
}
return FALSE ;
} |
Partager