]> git.mdlowis.com Git - proto/labwc.git/commitdiff
s/desktop_view_at()/desktop_surface_and_view_at()/
authorJohan Malm <jgm323@gmail.com>
Sat, 25 Sep 2021 09:04:37 +0000 (10:04 +0100)
committerJohan Malm <jgm323@gmail.com>
Sat, 25 Sep 2021 09:04:37 +0000 (10:04 +0100)
Make is clearer what the function does.

include/labwc.h
src/cursor.c
src/desktop.c

index 2da1deb9604bf68abee4647087abb4c5df2c18b4..5c3eb1b4ec3b003fa6c9fad32860c2470dea52a6 100644 (file)
@@ -342,11 +342,12 @@ void desktop_focus_topmost_mapped_view(struct server *server);
 bool isfocusable(struct view *view);
 
 /**
- * desktop_view_at - find view or layer-surface at co-ordinate (lx, ly)
+ * desktop_surface_and_view_at - find view and surface at (lx, ly)
  * Note: If surface points to layer-surface, view will be set to NULL
  */
-struct view *desktop_view_at(struct server *server, double lx, double ly,
-       struct wlr_surface **surface, double *sx, double *sy, int *view_area);
+struct view *desktop_surface_and_view_at(struct server *server, double lx,
+       double ly, struct wlr_surface **surface, double *sx, double *sy,
+       int *view_area);
 
 void cursor_init(struct seat *seat);
 
index a6fae2878017695817dd3f595155d607760375f9..28db6fdaf24c57bfa9d116b31e705213043f1c27 100644 (file)
@@ -139,14 +139,15 @@ process_cursor_motion(struct server *server, uint32_t time)
                return;
        }
 
-       /* Otherwise, find the view under the pointer and send the event along */
+       /* Otherwise, find view under the pointer and send the event along */
        double sx, sy;
        struct wlr_seat *wlr_seat = server->seat.seat;
        struct wlr_surface *surface = NULL;
        int view_area = LAB_SSD_NONE;
-       struct view *view =
-               desktop_view_at(server, server->seat.cursor->x,
-                       server->seat.cursor->y, &surface, &sx, &sy, &view_area);
+       struct view *view = desktop_surface_and_view_at(server,
+               server->seat.cursor->x, server->seat.cursor->y, &surface,
+               &sx, &sy, &view_area);
+
        if (!view) {
                set_cursor(server, XCURSOR_DEFAULT);
        } else {
@@ -296,8 +297,9 @@ cursor_button(struct wl_listener *listener, void *data)
        int view_area = LAB_SSD_NONE;
        uint32_t resize_edges;
 
-       struct view *view = desktop_view_at(server, server->seat.cursor->x,
-               server->seat.cursor->y, &surface, &sx, &sy, &view_area);
+       struct view *view = desktop_surface_and_view_at(server,
+               server->seat.cursor->x, server->seat.cursor->y, &surface,
+               &sx, &sy, &view_area);
 
        /* handle alt + _press_ on view */
        struct wlr_input_device *device = seat->keyboard_group->input_device;
index 2e113224e8315294903b187247f7caac0c38b679..934bb3c69088fdcd290b7441362125fcd7b80700 100644 (file)
@@ -297,7 +297,7 @@ wlr_surface *layer_surface_at(struct wl_list *layer, double lx, double ly,
 }
 
 struct view *
-desktop_view_at(struct server *server, double lx, double ly,
+desktop_surface_and_view_at(struct server *server, double lx, double ly,
                struct wlr_surface **surface, double *sx, double *sy,
                int *view_area)
 {