xfree86: use bool as retval for xf86VTSwitchAway()

Prefer stdbool over our own historical Bool.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-01-27 12:10:28 +01:00
committed by Enrico Weigelt
parent ce3e1aa388
commit ed9b67052a
5 changed files with 17 additions and 17 deletions

View File

@@ -4,6 +4,8 @@
*/
#include <xorg-config.h>
#include <stdbool.h>
#include "xf86_console_priv.h"
#include "xf86_os_support.h"
@@ -13,10 +15,10 @@ void xf86OSRingBell(int loudness, int pitch, int duration)
xf86_console_proc_bell(loudness, pitch, duration);
}
Bool xf86VTSwitchAway(void)
bool xf86VTSwitchAway(void)
{
if (xf86_console_proc_switch_away)
if (xf86_console_proc_switch_away())
return TRUE;
return FALSE;
return true;
return false;
}

View File

@@ -39,10 +39,9 @@ xf86VTSwitchPending(void)
return FALSE;
}
Bool
xf86VTSwitchAway(void)
bool xf86VTSwitchAway(void)
{
return FALSE;
return false;
}
Bool

View File

@@ -57,16 +57,15 @@ xf86VTSwitchPending(void)
return xf86Info.vtRequestsPending ? TRUE : FALSE;
}
Bool
xf86VTSwitchAway(void)
bool xf86VTSwitchAway(void)
{
xf86Info.vtRequestsPending = FALSE;
if (seatd_libseat_controls_session())
return TRUE;
return true;
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
return FALSE;
return false;
else
return TRUE;
return true;
}
Bool

View File

@@ -66,8 +66,7 @@ xf86VTSwitchPending(void)
return xf86Info.vtRequestsPending ? TRUE : FALSE;
}
Bool
xf86VTSwitchAway(void)
bool xf86VTSwitchAway(void)
{
int door_fd;
vt_cmd_arg_t vt_door_arg;
@@ -78,7 +77,7 @@ xf86VTSwitchAway(void)
if (xf86VTPruneDoor) {
xf86VTPruneDoor = 0;
ioctl(xf86Info.consoleFd, VT_RELDISP, 1);
return TRUE;
return true;
}
vt_door_arg.vt_ev = VT_EV_HOTKEYS;
@@ -91,11 +90,11 @@ xf86VTSwitchAway(void)
door_arg.desc_num = 0;
if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0)
return FALSE;
return false;
if (door_call(door_fd, &door_arg) != 0) {
close(door_fd);
return FALSE;
return false;
}
close(door_fd);

View File

@@ -8,6 +8,7 @@
#ifndef _XSERVER_XF86_OS_SUPPORT
#define _XSERVER_XF86_OS_SUPPORT
#include <stdbool.h>
#include <X11/Xdefs.h>
#include "os.h"
@@ -38,7 +39,7 @@ Bool xf86VTKeepTtyIsSet(void);
Bool xf86VTActivate(int vtno);
Bool xf86VTSwitchPending(void);
Bool xf86VTSwitchAway(void);
bool xf86VTSwitchAway(void);
Bool xf86VTSwitchTo(void);
void xf86VTRequest(int sig);
int xf86ProcessArgument(int argc, char **argv, int i);