Merge pull request #2435 from PySimpleGUI/Dev-latest
Changed how window.bring_to_front is implemented on Windows
This commit is contained in:
		
						commit
						cfbf055dba
					
				
					 1 changed files with 14 additions and 5 deletions
				
			
		|  | @ -1,6 +1,6 @@ | ||||||
| #!/usr/bin/python3 | #!/usr/bin/python3 | ||||||
| 
 | 
 | ||||||
| version = __version__ = "4.14.0.1  Unreleased - blank Text element sized to default element size, removed X-margin for row frames, added events for Calendar button but may remove" | version = __version__ = "4.14.1.3  Unreleased - blank Text element sized to default element size, added events for Calendar button but may remove, changed how bring_to_front works on Windows, SetIcon bug fix" | ||||||
| 
 | 
 | ||||||
| port = 'PySimpleGUI' | port = 'PySimpleGUI' | ||||||
| 
 | 
 | ||||||
|  | @ -6351,10 +6351,19 @@ class Window: | ||||||
|         Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay |         Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay | ||||||
|         on top") |         on top") | ||||||
|         """ |         """ | ||||||
|         try: |         if sys.platform.startswith('win'): | ||||||
|             self.TKroot.lift() |             try: | ||||||
|         except: |                 self.TKroot.wm_attributes("-topmost", 0) | ||||||
|             pass |                 self.TKroot.wm_attributes("-topmost", 1) | ||||||
|  |                 if not self.KeepOnTop: | ||||||
|  |                     self.TKroot.wm_attributes("-topmost", 0) | ||||||
|  |             except: | ||||||
|  |                 pass | ||||||
|  |         else: | ||||||
|  |             try: | ||||||
|  |                 self.TKroot.lift() | ||||||
|  |             except: | ||||||
|  |                 pass | ||||||
| 
 | 
 | ||||||
|     def SendToBack(self): |     def SendToBack(self): | ||||||
|         """ |         """ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue