aboutsummaryrefslogtreecommitdiffstats
path: root/fbi.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-04-16 13:43:59 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-04-16 13:43:59 +0200
commit63b5412f8c410694e8c67452452273ae8a9a6871 (patch)
tree541e7568118c16508465c512df08ab4a9ea4f971 /fbi.c
parent1bc4ff02dc49e8860414317bab577eee88fd3ad0 (diff)
downloadfbida-63b5412f8c410694e8c67452452273ae8a9a6871.tar.gz
resume display tweak
Diffstat (limited to 'fbi.c')
-rw-r--r--fbi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fbi.c b/fbi.c
index 8e6a5e8..72baf9d 100644
--- a/fbi.c
+++ b/fbi.c
@@ -38,6 +38,7 @@
#include "filter.h"
#include "desktop.h"
#include "fbiconfig.h"
+#include "logind.h"
#include "transupp.h" /* Support routines for jpegtran */
#include "jpegtools.h"
@@ -1201,11 +1202,15 @@ static void cleanup_and_exit(int code)
static void console_switch_suspend(void)
{
kbd_suspend();
+ gfx->suspend_display();
+ logind_release_control();
}
static void console_switch_resume(void)
{
- gfx->resume_display();
+ logind_take_control();
+ if (gfx->resume_display() < 0)
+ cleanup_and_exit(1);
shadow_render(gfx);
kbd_resume();
}