aboutsummaryrefslogtreecommitdiffstats
path: root/fbcon.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-03-27 13:33:49 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-27 13:33:49 +0100
commit59ca05ee1a59c5298767cf9563ef7f92ec895936 (patch)
tree6b0e8eecb498f7c01f4ae7bff540ee5e175c2451 /fbcon.c
parente772b065d85445049854d806cd06943dbd58d619 (diff)
downloadfbida-59ca05ee1a59c5298767cf9563ef7f92ec895936.tar.gz
[wip still] more logind console switching
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;
}