SEBWIN-611: Attempt to correctly resize lockscreen on display resolution change.
This commit is contained in:
		
							parent
							
								
									baad469be6
								
							
						
					
					
						commit
						2aaa74c7b0
					
				
					 4 changed files with 27 additions and 0 deletions
				
			
		| 
						 | 
					@ -625,9 +625,12 @@ namespace SafeExamBrowser.Client
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			logger.Info("Re-initializing working area...");
 | 
								logger.Info("Re-initializing working area...");
 | 
				
			||||||
			displayMonitor.InitializePrimaryDisplay(Settings.Taskbar.EnableTaskbar ? taskbar.GetAbsoluteHeight() : 0);
 | 
								displayMonitor.InitializePrimaryDisplay(Settings.Taskbar.EnableTaskbar ? taskbar.GetAbsoluteHeight() : 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			logger.Info("Re-initializing shell...");
 | 
								logger.Info("Re-initializing shell...");
 | 
				
			||||||
			actionCenter.InitializeBounds();
 | 
								actionCenter.InitializeBounds();
 | 
				
			||||||
 | 
								lockScreen?.InitializeBounds();
 | 
				
			||||||
			taskbar.InitializeBounds();
 | 
								taskbar.InitializeBounds();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			logger.Info("Desktop successfully restored.");
 | 
								logger.Info("Desktop successfully restored.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (!displayMonitor.ValidateConfiguration(Settings.Display).IsAllowed)
 | 
								if (!displayMonitor.ValidateConfiguration(Settings.Display).IsAllowed)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,11 @@ namespace SafeExamBrowser.UserInterface.Contracts.Windows
 | 
				
			||||||
		/// </summary>
 | 
							/// </summary>
 | 
				
			||||||
		void Cancel();
 | 
							void Cancel();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							/// <summary>
 | 
				
			||||||
 | 
							/// Expands the lock screen across all active displays and resizes it accordingly.
 | 
				
			||||||
 | 
							/// </summary>
 | 
				
			||||||
 | 
							void InitializeBounds();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/// <summary>
 | 
							/// <summary>
 | 
				
			||||||
		/// Waits for the user to provide the required input to unlock the application.
 | 
							/// Waits for the user to provide the required input to unlock the application.
 | 
				
			||||||
		/// </summary>
 | 
							/// </summary>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,6 +68,20 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
 | 
				
			||||||
			Dispatcher.Invoke(CloseAll);
 | 
								Dispatcher.Invoke(CloseAll);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							public void InitializeBounds()
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								foreach (var window in windows)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									window.Topmost = true;
 | 
				
			||||||
 | 
									window.WindowState = WindowState.Maximized;
 | 
				
			||||||
 | 
									window.Activate();
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								Topmost = true;
 | 
				
			||||||
 | 
								WindowState = WindowState.Maximized;
 | 
				
			||||||
 | 
								Activate();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public new void Show()
 | 
							public new void Show()
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			Dispatcher.Invoke(ShowAll);
 | 
								Dispatcher.Invoke(ShowAll);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,6 +68,11 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
 | 
				
			||||||
			Dispatcher.Invoke(CloseAll);
 | 
								Dispatcher.Invoke(CloseAll);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							public void InitializeBounds()
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								// TODO
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public new void Show()
 | 
							public new void Show()
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			Dispatcher.Invoke(ShowAll);
 | 
								Dispatcher.Invoke(ShowAll);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue