simple privacy mode

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-01-15 16:31:21 +08:00
parent a1c4b08535
commit 25492c815c
8 changed files with 197 additions and 90 deletions

View File

@@ -600,12 +600,13 @@ pub fn lock_screen() {
});
}
pub fn toggle_privacy_mode(_v: bool) {
pub fn toggle_blank_screen(_v: bool) {
// https://unix.stackexchange.com/questions/17170/disable-keyboard-mouse-input-on-unix-under-x
}
pub fn block_input(_v: bool) {
pub fn block_input(_v: bool) -> bool {
//
true
}
pub fn is_installed() -> bool {

View File

@@ -398,12 +398,13 @@ pub fn start_os_service() {
}
}
pub fn toggle_privacy_mode(_v: bool) {
pub fn toggle_blank_screen(_v: bool) {
// https://unix.stackexchange.com/questions/17115/disable-keyboard-mouse-temporarily
}
pub fn block_input(_v: bool) {
pub fn block_input(_v: bool) -> bool {
//
true
}
pub fn is_installed() -> bool {

View File

@@ -1020,11 +1020,9 @@ pub fn toggle_blank_screen(v: bool) {
}
}
pub fn block_input(v: bool) {
pub fn block_input(v: bool) -> bool {
let v = if v { TRUE } else { FALSE };
unsafe {
BlockInput(v);
}
unsafe { BlockInput(v) == TRUE }
}
pub fn add_recent_document(path: &str) {