diff --git a/dislocker_client.py b/dislocker_client.py index 8f9ba1e..d3517ab 100644 --- a/dislocker_client.py +++ b/dislocker_client.py @@ -167,7 +167,16 @@ def init(**kwargs): class App(customtkinter.CTk): def __init__(self): super().__init__() - + + if client_config["testing"] == True: + pass + else: + self.block_taskmgr() + self.block_key() + shutup_window = keyboard.press_and_release('windows + d') + self.attributes('-fullscreen', True) + self.attributes('-topmost', True) + if client_config["hard_lock"] == True: exit_explorer = subprocess.run('taskkill /f /im explorer.exe', startupinfo=sp_startupinfo, stdout=subprocess.PIPE, text=True) if exit_explorer.returncode == 0: @@ -178,15 +187,6 @@ class App(customtkinter.CTk): self.title(f"{app_name} | ロック中") self.iconbitmap(default=resource_path + '\\icon\\dislocker.ico') - if client_config["testing"] == True: - pass - else: - shutup_window = keyboard.press_and_release('windows + d') - self.attributes('-fullscreen', True) - self.attributes('-topmost', True) - self.block_taskmgr() - self.block_key() - self.frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent') self.frame.grid(row=0, column=0, sticky='nsew')