spkp

Stacking wayland compositor
git clone git://git.z3bra.org/spkp.git
Log | Files | Refs

commit 525ea7dcb1b101b54fef91fd6084734aa79e6046
parent 3867c8b681c67c614f258aad4dc65fb8f775786f
Author: Willy Goiffon <dev@z3bra.org>
Date:   Mon, 16 Nov 2020 14:12:10 +0100

Rename "topmost" window attribute to "surface"

Diffstat:
Msp:kp.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sp:kp.c b/sp:kp.c @@ -103,13 +103,13 @@ struct output { /* Client surface window */ struct window { struct state *server; + struct wlr_surface *surface; struct wlr_xdg_surface *toplevel; struct wlr_xdg_toplevel_decoration_v1 decoration; double x, y; int mapped; - struct wlr_surface *topmost; double sx, sy; int area; @@ -682,11 +682,11 @@ cb_motion(struct state *server, uint32_t time) return; } - if (w->topmost) { - if (seat->pointer_state.focused_surface == w->topmost) + if (w->surface) { + if (seat->pointer_state.focused_surface == w->surface) wlr_seat_pointer_notify_motion(seat, time, w->sx, w->sy); else - wlr_seat_pointer_notify_enter(seat, w->topmost, w->sx, w->sy); + wlr_seat_pointer_notify_enter(seat, w->surface, w->sx, w->sy); } } @@ -1026,7 +1026,7 @@ focus(struct window *window) focus = seat->keyboard_state.focused_surface; /* skip if window is already focused */ - if (focus == window->topmost) + if (focus == window->surface) return; /* deactivate currently focused window */ @@ -1103,10 +1103,10 @@ underneath(struct state *server, double x, double y) * sx, sy will be updated with the pointer coordinates * within the subsurface (always positive). */ - w->topmost = wlr_xdg_surface_surface_at(w->toplevel, + w->surface = wlr_xdg_surface_surface_at(w->toplevel, x - w->x, y - w->y, &w->sx, &w->sy); - if (w->topmost) { + if (w->surface) { w->area = CONTENT; return w; }