diff --git a/boiiiwd_package/src/library_tab.py b/boiiiwd_package/src/library_tab.py index 404984b..5dcc91e 100644 --- a/boiiiwd_package/src/library_tab.py +++ b/boiiiwd_package/src/library_tab.py @@ -614,7 +614,9 @@ class LibraryTab(ctk.CTkScrollableFrame): if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")): top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico"))) top.title("Map/Mod Information") - top.attributes('-topmost', 'true') + _, _, x, y = get_window_size_from_registry() + top.geometry(f"+{x+50}+{y-50}") + # top.attributes('-topmost', 'true') size_text = "Size (Workshop):" if offline_date: @@ -792,6 +794,7 @@ class LibraryTab(ctk.CTkScrollableFrame): buttons_frame.grid_columnconfigure(2, weight=1) finally: + top.after(10, top.focus_force) for button_view in self.button_view_list: button_view.configure(state="normal") self.after(0, main_thread) diff --git a/boiiiwd_package/src/main.py b/boiiiwd_package/src/main.py index 65ffbf3..efa3c3e 100644 --- a/boiiiwd_package/src/main.py +++ b/boiiiwd_package/src/main.py @@ -657,7 +657,9 @@ class BOIIIWD(ctk.CTk): top = ctk.CTkToplevel(self) top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico"))) top.title("Map/Mod Information") - top.attributes('-topmost', 'true') + _, _, x, y = get_window_size_from_registry() + top.geometry(f"+{x+50}+{y-50}") + # top.attributes('-topmost', 'true') def close_window(): top.destroy() @@ -772,6 +774,7 @@ class BOIIIWD(ctk.CTk): top.grid_rowconfigure(2, weight=1) top.grid_columnconfigure(0, weight=1) top.grid_columnconfigure(1, weight=1) + top.after(10, top.focus_force) self.after(0, main_thread) diff --git a/boiiiwd_package/src/settings_tab.py b/boiiiwd_package/src/settings_tab.py index bc69743..dd2030c 100644 --- a/boiiiwd_package/src/settings_tab.py +++ b/boiiiwd_package/src/settings_tab.py @@ -510,7 +510,9 @@ class SettingsTab(ctk.CTkFrame): if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")): top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico"))) top.title("Steam to boiii -> Workshop items") - top.attributes('-topmost', 'true') + _, _, x, y = get_window_size_from_registry() + top.geometry(f"+{x}+{y}") + # top.attributes('-topmost', 'true') top.resizable(False, False) # Create input boxes center_frame = ctk.CTkFrame(top) @@ -716,6 +718,7 @@ class SettingsTab(ctk.CTkFrame): main_app.app.create_context_menu(boiii_folder_entry) copy_var.set(True) progress_bar.set(0) + main_app.app.after(100, top.focus_force) except Exception as e: show_message("Error", f"{e}", icon="cancel") diff --git a/boiiiwd_package/src/update_window.py b/boiiiwd_package/src/update_window.py index a70af6c..7ba52f4 100644 --- a/boiiiwd_package/src/update_window.py +++ b/boiiiwd_package/src/update_window.py @@ -46,7 +46,8 @@ class UpdateWindow(ctk.CTkToplevel): def __init__(self, master, update_url): super().__init__(master) self.title("BOIIIWD Self-Updater") - self.geometry("400x150") + _, _, x, y = get_window_size_from_registry() + self.geometry(f"400x150+{x}+{y}") if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")): self.after(250, lambda: self.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico"))) self.protocol("WM_DELETE_WINDOW", self.cancel_update)