Bind fullscreen switching
Also, move Tab/Enter bindings to the view's key press handler.
This commit is contained in:
parent
b23198f675
commit
9e45ba249e
19
fastiv.c
19
fastiv.c
|
@ -338,13 +338,13 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
|
||||||
gtk_widget_show(g.browser_sidebar);
|
gtk_widget_show(g.browser_sidebar);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case GDK_KEY_Tab:
|
case GDK_KEY_F11:
|
||||||
case GDK_KEY_Return:
|
case GDK_KEY_f:
|
||||||
gtk_stack_set_visible_child(GTK_STACK(g.stack),
|
if (gdk_window_get_state(gtk_widget_get_window(g.window)) &
|
||||||
gtk_stack_get_visible_child(GTK_STACK(g.stack)) ==
|
GDK_WINDOW_STATE_FULLSCREEN)
|
||||||
g.view_scroller
|
gtk_window_unfullscreen(GTK_WINDOW(g.window));
|
||||||
? g.browser_paned
|
else
|
||||||
: g.view_scroller);
|
gtk_window_fullscreen(GTK_WINDOW(g.window));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,6 +371,11 @@ on_key_press_view(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
|
||||||
on_next();
|
on_next();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case GDK_KEY_Tab:
|
||||||
|
case GDK_KEY_Return:
|
||||||
|
gtk_stack_set_visible_child(GTK_STACK(g.stack), g.browser_paned);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue