SEBWIN-567: Ensured action center and taskbar keyboard activators do not block one another.
This commit is contained in:
		
							parent
							
								
									05a4bd126a
								
							
						
					
					
						commit
						ee852057ce
					
				
					 2 changed files with 5 additions and 9 deletions
				
			
		|  | @ -17,8 +17,8 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators | ||||||
| { | { | ||||||
| 	public class ActionCenterKeyboardActivator : KeyboardActivator, IActionCenterActivator | 	public class ActionCenterKeyboardActivator : KeyboardActivator, IActionCenterActivator | ||||||
| 	{ | 	{ | ||||||
|  | 		private readonly ILogger logger; | ||||||
| 		private bool A, LeftWindows; | 		private bool A, LeftWindows; | ||||||
| 		private ILogger logger; |  | ||||||
| 
 | 
 | ||||||
| 		public event ActivatorEventHandler Activated { add { } remove { } } | 		public event ActivatorEventHandler Activated { add { } remove { } } | ||||||
| 		public event ActivatorEventHandler Deactivated { add { } remove { } } | 		public event ActivatorEventHandler Deactivated { add { } remove { } } | ||||||
|  | @ -56,8 +56,6 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators | ||||||
| 			{ | 			{ | ||||||
| 				logger.Debug("Detected toggle sequence for action center."); | 				logger.Debug("Detected toggle sequence for action center."); | ||||||
| 				Toggled?.Invoke(); | 				Toggled?.Invoke(); | ||||||
| 
 |  | ||||||
| 				return true; |  | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			return false; | 			return false; | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators | ||||||
| 	public class TaskbarKeyboardActivator : KeyboardActivator, ITaskbarActivator | 	public class TaskbarKeyboardActivator : KeyboardActivator, ITaskbarActivator | ||||||
| 	{ | 	{ | ||||||
| 		private readonly ILogger logger; | 		private readonly ILogger logger; | ||||||
| 		private bool leftWindows; | 		private bool LeftWindows; | ||||||
| 
 | 
 | ||||||
| 		public event ActivatorEventHandler Activated; | 		public event ActivatorEventHandler Activated; | ||||||
| 
 | 
 | ||||||
|  | @ -34,16 +34,14 @@ namespace SafeExamBrowser.UserInterface.Shared.Activators | ||||||
| 
 | 
 | ||||||
| 			if (key == Key.LWin) | 			if (key == Key.LWin) | ||||||
| 			{ | 			{ | ||||||
| 				changed = leftWindows != pressed; | 				changed = LeftWindows != pressed; | ||||||
| 				leftWindows = pressed; | 				LeftWindows = pressed; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			if (leftWindows && changed) | 			if (LeftWindows && changed) | ||||||
| 			{ | 			{ | ||||||
| 				logger.Debug("Detected activation sequence for taskbar."); | 				logger.Debug("Detected activation sequence for taskbar."); | ||||||
| 				Activated?.Invoke(); | 				Activated?.Invoke(); | ||||||
| 
 |  | ||||||
| 				return true; |  | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			return false; | 			return false; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Damian Büchel
						Damian Büchel