diff options
| author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-14 13:09:09 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-27 23:09:08 -0600 | 
| commit | b616476c856d893e0d7bd1e35b74cc996ec7f4b4 (patch) | |
| tree | 9c0ed963e2065aa4abbf5cba7368ec36755d46ea /dwl.c | |
| parent | d4ad37354e9ae8d475f8de9300903f8dd19e0f9b (diff) | |
remove unnecessary LayerShell.geom
We only used geom.x and geom.y. We can access those variables directly from the
scene node.
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 11 | 
1 files changed, 4 insertions, 7 deletions
| @@ -171,7 +171,6 @@ typedef struct {  	unsigned int type; /* LayerShell */  	Monitor *mon; -	struct wlr_box geom;  	struct wlr_scene_tree *scene;  	struct wlr_scene_tree *popups;  	struct wlr_scene_layer_surface_v1 *scene_layer; @@ -533,8 +532,6 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int  		wlr_scene_layer_surface_v1_configure(l->scene_layer, &full_area, usable_area);  		wlr_scene_node_set_position(&l->popups->node, l->scene->node.x, l->scene->node.y); -		l->geom.x = l->scene->node.x; -		l->geom.y = l->scene->node.y;  	}  } @@ -844,8 +841,8 @@ commitpopup(struct wl_listener *listener, void *data)  	if ((l && !l->mon) || (c && !c->mon))  		return;  	box = type == LayerShell ? l->mon->m : c->mon->w; -	box.x -= (type == LayerShell ? l->geom.x : c->geom.x); -	box.y -= (type == LayerShell ? l->geom.y : c->geom.y); +	box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x); +	box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y);  	wlr_xdg_popup_unconstrain_from_box(popup, &box);  	wl_list_remove(&listener->link);  } @@ -1824,8 +1821,8 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d  			&& toplevel_from_wlr_surface(seat->pointer_state.focused_surface, &w, &l) >= 0) {  		c = w;  		surface = seat->pointer_state.focused_surface; -		sx = cursor->x - (l ? l->geom.x : w->geom.x); -		sy = cursor->y - (l ? l->geom.y : w->geom.y); +		sx = cursor->x - (l ? l->scene->node.x : w->geom.x); +		sy = cursor->y - (l ? l->scene->node.y : w->geom.y);  	}  	/* time is 0 in internal calls meant to restore pointer focus. */ | 
