mirror of
				https://github.com/wizbright/waybox.git
				synced 2025-10-29 05:40:20 -04:00 
			
		
		
		
	Added viewporter
This commit is contained in:
		
							parent
							
								
									b802cadffa
								
							
						
					
					
						commit
						4c6a762e12
					
				
					 3 changed files with 4 additions and 1 deletions
				
			
		|  | @ -27,4 +27,5 @@ executable( | |||
|   dependencies: [wb_dep, wlr_protos], | ||||
|   install: true, | ||||
|   install_dir: get_option('prefix') / get_option('libexecdir'), | ||||
|   link_args: ['-Wl,-lm'], | ||||
|   ) | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| #include <wlr/types/wlr_data_control_v1.h> | ||||
| #include <wlr/types/wlr_fractional_scale_v1.h> | ||||
| #include <wlr/types/wlr_viewporter.h> | ||||
| 
 | ||||
| #include "idle.h" | ||||
| #include "waybox/server.h" | ||||
|  | @ -130,6 +131,7 @@ bool wb_start_server(struct wb_server* server) { | |||
| 	init_xdg_shell(server); | ||||
| 
 | ||||
| 	wlr_fractional_scale_manager_v1_create(server->wl_display, 1); | ||||
| 	wlr_viewporter_create(server->wl_display); | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
|  |  | |||
|  | @ -159,7 +159,7 @@ static void update_fractional_scale(struct wlr_surface *surface) { | |||
| 		} | ||||
| 	} | ||||
| 	wlr_fractional_scale_v1_notify_scale(surface, scale); | ||||
| 	wlr_surface_set_preferred_buffer_scale(surface, (int) scale); | ||||
| 	wlr_surface_set_preferred_buffer_scale(surface, ceil(scale)); | ||||
| } | ||||
| 
 | ||||
| static void xdg_toplevel_commit(struct wl_listener *listener, void *data) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Keith Bowes
						Keith Bowes