fix: multimon: always spawn client on first monitor if specified with -m 0
This was always broken. Reproduce: focus client on second monitor, spawn dmenu with -m 0. Result: Old wrong behaviour: dmenu spawns on second monitor (focused client). Now: dmenu spawns on specified monitor (first).
This commit is contained in:
		
							
								
								
									
										2
									
								
								dmenu.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								dmenu.c
									
									
									
									
									
								
							@ -552,7 +552,7 @@ setup(void)
 | 
				
			|||||||
		XGetInputFocus(dpy, &w, &di);
 | 
							XGetInputFocus(dpy, &w, &di);
 | 
				
			||||||
		if (mon != -1 && mon < n)
 | 
							if (mon != -1 && mon < n)
 | 
				
			||||||
			i = mon;
 | 
								i = mon;
 | 
				
			||||||
		if (!i && w != root && w != PointerRoot && w != None) {
 | 
							else if (w != root && w != PointerRoot && w != None) {
 | 
				
			||||||
			/* find top-level window containing current input focus */
 | 
								/* find top-level window containing current input focus */
 | 
				
			||||||
			do {
 | 
								do {
 | 
				
			||||||
				if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws)
 | 
									if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user