Change to timeouts seems to fix the problems
This commit is contained in:
		
							parent
							
								
									15a4db94db
								
							
						
					
					
						commit
						5dc2eb3cb0
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -52,7 +52,7 @@ window = sg.Window('Window Title', return_keyboard_events=True).Layout(layout) | ||||||
| 
 | 
 | ||||||
| sel_item = -1 | sel_item = -1 | ||||||
| while True:             # Event Loop | while True:             # Event Loop | ||||||
|     event, values = window.Read() |     event, values = window.Read(timeout=0) | ||||||
|     if event is None or event == 'Exit': |     if event is None or event == 'Exit': | ||||||
|         break |         break | ||||||
|     if event != sg.TIMEOUT_KEY: |     if event != sg.TIMEOUT_KEY: | ||||||
|  | @ -84,7 +84,7 @@ while True:             # Event Loop | ||||||
|             window.Element('_INPUT_').Update('') |             window.Element('_INPUT_').Update('') | ||||||
| 
 | 
 | ||||||
|     try: |     try: | ||||||
|         ev2, vals2 = fwindow.Read(timeout=0) |         ev2, vals2 = fwindow.Read(timeout=100) | ||||||
|         if ev2 != sg.TIMEOUT_KEY: |         if ev2 != sg.TIMEOUT_KEY: | ||||||
|             fwindow.Close() |             fwindow.Close() | ||||||
|             # sg.Popup('Chose from window', vals2['_FLOATING_LISTBOX_']) |             # sg.Popup('Chose from window', vals2['_FLOATING_LISTBOX_']) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue