mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fixed focus bug of CTk and CTkToplevel on macOS
This commit is contained in:
@ -70,9 +70,9 @@ class CTkToplevel(tkinter.Toplevel):
|
||||
self.bind('<FocusIn>', self._focus_in_event)
|
||||
|
||||
def _focus_in_event(self, event):
|
||||
# sometimes window looses focus on macOS if window is selected from Mission Control, so focus has to be forced again
|
||||
# sometimes window looses jumps back on macOS if window is selected from Mission Control, so has to be lifted again
|
||||
if sys.platform == "darwin":
|
||||
self.focus_force()
|
||||
self.lift()
|
||||
|
||||
def _update_dimensions_event(self, event=None):
|
||||
detected_width = self.winfo_width() # detect current window size
|
||||
|
Reference in New Issue
Block a user