aboutsummaryrefslogtreecommitdiffstats
path: root/fbcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'fbcon.c')
-rw-r--r--fbcon.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/fbcon.c b/fbcon.c
index d9b208e..489191a 100644
--- a/fbcon.c
+++ b/fbcon.c
@@ -446,18 +446,13 @@ static void fbcon_handle_keydown(struct xkb_state *state,
return;
}
-#if 0
/* WIP & broken */
- if (logind && ctrlalt) {
- if (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
- int vt = sym - XKB_KEY_F1 + 1;
- fprintf(stderr, "console switch to vt %d\n", vt);
- console_switch_suspend();
- logind_switch_vt(vt);
- return;
- }
+ if (logind && sym >= XKB_KEY_XF86Switch_VT_1 && sym <= XKB_KEY_XF86Switch_VT_12) {
+ int vt = sym - XKB_KEY_XF86Switch_VT_1 + 1;
+ console_switch_suspend();
+ logind_switch_vt(vt);
+ return;
}
-#endif
/* scrollback */
if (shift && sym == XKB_KEY_Up) {
@@ -600,7 +595,8 @@ int main(int argc, char *argv[])
if (xdg_seat)
seat_name = xdg_seat;
if (xdg_seat && xdg_session_id) {
- if (logind_init(true) == 0) {
+ if (logind_init(true, NULL,
+ console_switch_resume) == 0) {
dbus = logind_dbus_fd();
logind = true;
}