mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	fix: fix surface focuse error when focus_on_activate is 0
This commit is contained in:
		
							parent
							
								
									09bd681919
								
							
						
					
					
						commit
						f56db5deb1
					
				
					 1 changed files with 2 additions and 8 deletions
				
			
		
							
								
								
									
										10
									
								
								src/maomao.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/maomao.c
									
										
									
									
									
								
							| 
						 | 
					@ -7406,19 +7406,12 @@ void smartresizewin(const Arg *arg) {
 | 
				
			||||||
void activatex11(struct wl_listener *listener, void *data) {
 | 
					void activatex11(struct wl_listener *listener, void *data) {
 | 
				
			||||||
  Client *c = wl_container_of(listener, c, activate);
 | 
					  Client *c = wl_container_of(listener, c, activate);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!c || c->iskilling)
 | 
					  if (!c || c->iskilling || !c->foreign_toplevel || client_is_unmanaged(c))
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (c && c->swallowing)
 | 
					  if (c && c->swallowing)
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Only "managed" windows can be activated */
 | 
					 | 
				
			||||||
  if (!client_is_unmanaged(c))
 | 
					 | 
				
			||||||
    wlr_xwayland_surface_activate(c->surface.xwayland, 1);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (!c || !c->foreign_toplevel)
 | 
					 | 
				
			||||||
    return;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (focus_on_activate && c != selmon->sel) {
 | 
					  if (focus_on_activate && c != selmon->sel) {
 | 
				
			||||||
    if (c->isminied) {
 | 
					    if (c->isminied) {
 | 
				
			||||||
      c->isminied = 0;
 | 
					      c->isminied = 0;
 | 
				
			||||||
| 
						 | 
					@ -7430,6 +7423,7 @@ void activatex11(struct wl_listener *listener, void *data) {
 | 
				
			||||||
      setborder_color(c);
 | 
					      setborder_color(c);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    view(&(Arg){.ui = c->tags}, true);
 | 
					    view(&(Arg){.ui = c->tags}, true);
 | 
				
			||||||
 | 
					    wlr_xwayland_surface_activate(c->surface.xwayland, 1);
 | 
				
			||||||
    focusclient(c, 1);
 | 
					    focusclient(c, 1);
 | 
				
			||||||
  } else if (c != focustop(selmon)) {
 | 
					  } else if (c != focustop(selmon)) {
 | 
				
			||||||
    if (client_surface(c)->mapped)
 | 
					    if (client_surface(c)->mapped)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue