mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-29 05:40:19 -04:00 
			
		
		
		
	Basic fullscreen
This commit is contained in:
		
							parent
							
								
									44ef698d6e
								
							
						
					
					
						commit
						60f0b667b1
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								dwl.c
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								dwl.c
									
										
									
									
									
								
							|  | @ -96,6 +96,7 @@ typedef struct { | |||
| 	struct wl_listener map; | ||||
| 	struct wl_listener unmap; | ||||
| 	struct wl_listener destroy; | ||||
| 	struct wl_listener fullscreen; | ||||
| 	struct wlr_box geom;  /* layout-relative, includes border */ | ||||
| 	Monitor *mon; | ||||
| #ifdef XWAYLAND | ||||
|  | @ -192,6 +193,7 @@ static void createxdeco(struct wl_listener *listener, void *data); | |||
| static void cursorframe(struct wl_listener *listener, void *data); | ||||
| static void destroynotify(struct wl_listener *listener, void *data); | ||||
| static void destroyxdeco(struct wl_listener *listener, void *data); | ||||
| static void fullscreenotify(struct wl_listener *listener, void *data); | ||||
| static Monitor *dirtomon(int dir); | ||||
| static void focusclient(Client *old, Client *c, int lift); | ||||
| static void focusmon(const Arg *arg); | ||||
|  | @ -598,6 +600,9 @@ createnotify(struct wl_listener *listener, void *data) | |||
| 	wl_signal_add(&xdg_surface->events.unmap, &c->unmap); | ||||
| 	c->destroy.notify = destroynotify; | ||||
| 	wl_signal_add(&xdg_surface->events.destroy, &c->destroy); | ||||
| 
 | ||||
| 	wl_signal_add(&xdg_surface->toplevel->events.request_fullscreen, &c->fullscreen); | ||||
| 	c->fullscreen.notify = fullscreenotify; | ||||
| } | ||||
| 
 | ||||
| void | ||||
|  | @ -664,6 +669,12 @@ destroyxdeco(struct wl_listener *listener, void *data) | |||
| 	free(d); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| fullscreenotify(struct wl_listener *listener, void *data) { | ||||
| 	Client *c = wl_container_of(listener, c, fullscreen); | ||||
| 	wlr_xdg_toplevel_set_fullscreen(c->surface.xdg, true); | ||||
| } | ||||
| 
 | ||||
| Monitor * | ||||
| dirtomon(int dir) | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Stivvo
						Stivvo