Fix monitor setting overriding follow_mode
Ignore the monitor setting if it's set to a non-zero value and the follow mode isn't none. Fixes #755
This commit is contained in:
		
							parent
							
								
									ca6ce6868e
								
							
						
					
					
						commit
						e59d203256
					
				| @ -304,21 +304,22 @@ struct screen_info *get_active_screen(void) | ||||
| { | ||||
|         int ret = 0; | ||||
|         bool force_follow_mouse = false; | ||||
|         if (settings.monitor > 0 && settings.monitor < screens_len) { | ||||
|                 ret = settings.monitor; | ||||
|                 goto sc_cleanup; | ||||
|         } | ||||
| 
 | ||||
|         x_follow_setup_error_handler(); | ||||
| 
 | ||||
|         if (settings.f_mode == FOLLOW_NONE) { | ||||
|                 ret = XDefaultScreen(xctx.dpy); | ||||
|                 goto sc_cleanup; | ||||
|                 if (settings.monitor >= 0 && settings.monitor < screens_len) { | ||||
|                         ret = settings.monitor; | ||||
|                 } else { | ||||
|                         ret = XDefaultScreen(xctx.dpy); | ||||
|                 } | ||||
| 
 | ||||
|                 goto sc_cleanup; | ||||
|         } else { | ||||
|                 int x, y; | ||||
|                 assert(settings.f_mode == FOLLOW_MOUSE | ||||
|                                 || settings.f_mode == FOLLOW_KEYBOARD); | ||||
| 
 | ||||
|                 x_follow_setup_error_handler(); | ||||
| 
 | ||||
|                 Window root = | ||||
|                         RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis