From f302b045e38efca359a729c28ccddc05e4623fd2 Mon Sep 17 00:00:00 2001 From: tschiman Date: Fri, 11 Nov 2022 14:09:50 +0100 Subject: [PATCH] fix input dialog for linux --- customtkinter/windows/ctk_input_dialog.py | 2 +- examples/complex_example.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/customtkinter/windows/ctk_input_dialog.py b/customtkinter/windows/ctk_input_dialog.py index 10e5c96..519d5af 100644 --- a/customtkinter/windows/ctk_input_dialog.py +++ b/customtkinter/windows/ctk_input_dialog.py @@ -43,12 +43,12 @@ class CTkInputDialog(CTkToplevel): self.title(title) self.focus_force() - self.grab_set() # make other windows not clickable self.lift() # lift window on top self.attributes("-topmost", True) # stay on top self.protocol("WM_DELETE_WINDOW", self._on_closing) self.after(0, self._create_widgets) # create widgets with slight delay, to avoid white flickering of background self.after(500, lambda: self.resizable(False, False)) + self.grab_set() # make other windows not clickable def _create_widgets(self): diff --git a/examples/complex_example.py b/examples/complex_example.py index e3742aa..4630f37 100644 --- a/examples/complex_example.py +++ b/examples/complex_example.py @@ -138,7 +138,7 @@ class App(customtkinter.CTk): self.seg_button_1.set("Value 2") def open_input_dialog(self): - dialog = customtkinter.CTkInputDialog(text="Type in a number:"*500, title="CTkInputDialog") + dialog = customtkinter.CTkInputDialog(text="Type in a number:"*50, title="CTkInputDialog") print("CTkInputDialog:", dialog.get_input()) def change_appearance_mode(self, new_appearance_mode: str):