mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #1773 from thejan2009/issue/swaybar-mouse
Use full ws->name in swaybar hotspot callback
This commit is contained in:
		
						commit
						bd236b6587
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -352,6 +352,7 @@ static uint32_t render_workspace_button(cairo_t *cairo,
 | 
				
			||||||
		struct swaybar_output *output, struct swaybar_config *config,
 | 
							struct swaybar_output *output, struct swaybar_config *config,
 | 
				
			||||||
		struct swaybar_workspace *ws, double *x, uint32_t surface_height) {
 | 
							struct swaybar_workspace *ws, double *x, uint32_t surface_height) {
 | 
				
			||||||
	const char *name = ws->name;
 | 
						const char *name = ws->name;
 | 
				
			||||||
 | 
						const char *whole_name = ws->name;
 | 
				
			||||||
	if (config->strip_workspace_numbers) {
 | 
						if (config->strip_workspace_numbers) {
 | 
				
			||||||
		name = strip_workspace_number(ws->name);
 | 
							name = strip_workspace_number(ws->name);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -411,7 +412,7 @@ static uint32_t render_workspace_button(cairo_t *cairo,
 | 
				
			||||||
	hotspot->height = height;
 | 
						hotspot->height = height;
 | 
				
			||||||
	hotspot->callback = workspace_hotspot_callback;
 | 
						hotspot->callback = workspace_hotspot_callback;
 | 
				
			||||||
	hotspot->destroy = free;
 | 
						hotspot->destroy = free;
 | 
				
			||||||
	hotspot->data = strdup(name);
 | 
						hotspot->data = strdup(whole_name);
 | 
				
			||||||
	wl_list_insert(&output->hotspots, &hotspot->link);
 | 
						wl_list_insert(&output->hotspots, &hotspot->link);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*x += width;
 | 
						*x += width;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue