mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	fix: build fail for non xwayland
This commit is contained in:
		
							parent
							
								
									692b7f867c
								
							
						
					
					
						commit
						47809c5783
					
				
					 2 changed files with 14 additions and 9 deletions
				
			
		| 
						 | 
					@ -456,3 +456,15 @@ static inline int client_wants_fullscreen(Client *c) {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	return c->surface.xdg->toplevel->requested.fullscreen;
 | 
						return c->surface.xdg->toplevel->requested.fullscreen;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline bool client_request_minimize(Client *c, void *data) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef XWAYLAND
 | 
				
			||||||
 | 
						if (client_is_x11(c)) {
 | 
				
			||||||
 | 
							struct wlr_xwayland_minimize_event *event = data;
 | 
				
			||||||
 | 
							return event->minimize;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return c->surface.xdg->toplevel->requested.minimized;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										11
									
								
								src/mango.c
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								src/mango.c
									
										
									
									
									
								
							| 
						 | 
					@ -3419,21 +3419,14 @@ minimizenotify(struct wl_listener *listener, void *data) {
 | 
				
			||||||
	// togglemaxmizescreen(&(Arg){0});
 | 
						// togglemaxmizescreen(&(Arg){0});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Client *c = wl_container_of(listener, c, minimize);
 | 
						Client *c = wl_container_of(listener, c, minimize);
 | 
				
			||||||
	struct wlr_xwayland_minimize_event *event = data;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!c || !c->mon || c->iskilling || c->isminied)
 | 
						if (!c || !c->mon || c->iskilling || c->isminied)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!client_is_x11(c)) {
 | 
						if (client_request_minimize(c, data)) {
 | 
				
			||||||
		if (!c->surface.xdg->toplevel->requested.minimized)
 | 
					 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		if (!event->minimize)
 | 
					 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		set_minized(c);
 | 
							set_minized(c);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void motionabsolute(struct wl_listener *listener, void *data) {
 | 
					void motionabsolute(struct wl_listener *listener, void *data) {
 | 
				
			||||||
	/* This event is forwarded by the cursor when a pointer emits an _absolute_
 | 
						/* This event is forwarded by the cursor when a pointer emits an _absolute_
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue