mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Remove wlr_ prefix from local symbols
This commit is contained in:
parent
097561d6bf
commit
b0d99f5c67
26 changed files with 163 additions and 199 deletions
|
|
@ -43,7 +43,7 @@ static bool wlr_wl_backend_start(struct wlr_backend *_backend) {
|
|||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend;
|
||||
wlr_log(L_INFO, "Initializating wayland backend");
|
||||
|
||||
wlr_wl_registry_poll(backend);
|
||||
wl_registry_poll(backend);
|
||||
if (!backend->compositor || !backend->shell) {
|
||||
wlr_log_errno(L_ERROR, "Could not obtain retrieve required globals");
|
||||
return false;
|
||||
|
|
@ -126,7 +126,7 @@ bool wlr_backend_is_wl(struct wlr_backend *b) {
|
|||
return b->impl == &backend_impl;
|
||||
}
|
||||
|
||||
struct wlr_wl_backend_output *wlr_wl_output_for_surface(
|
||||
struct wlr_wl_backend_output *wl_output_for_surface(
|
||||
struct wlr_wl_backend *backend, struct wl_surface *surface) {
|
||||
struct wlr_wl_backend_output *output;
|
||||
wl_list_for_each(output, &backend->outputs, link) {
|
||||
|
|
@ -137,7 +137,7 @@ struct wlr_wl_backend_output *wlr_wl_output_for_surface(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void wlr_wl_output_layout_get_box(struct wlr_wl_backend *backend,
|
||||
void wl_output_layout_get_box(struct wlr_wl_backend *backend,
|
||||
struct wlr_box *box) {
|
||||
int min_x = INT_MAX, min_y = INT_MAX;
|
||||
int max_x = INT_MIN, max_y = INT_MIN;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
|
|||
|
||||
if (!update_pixels) {
|
||||
// Update hotspot without changing cursor image
|
||||
wlr_wl_output_update_cursor(output);
|
||||
wl_output_update_cursor(output);
|
||||
return true;
|
||||
}
|
||||
if (!buf) {
|
||||
|
|
@ -95,7 +95,7 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
|
|||
output->cursor.surface = NULL;
|
||||
output->cursor.buf_size = 0;
|
||||
}
|
||||
wlr_wl_output_update_cursor(output);
|
||||
wl_output_update_cursor(output);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
|
|||
wl_surface_damage(output->cursor.surface, 0, 0, width, height);
|
||||
wl_surface_commit(output->cursor.surface);
|
||||
|
||||
wlr_wl_output_update_cursor(output);
|
||||
wl_output_update_cursor(output);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ static void wlr_wl_output_destroy(struct wlr_output *wlr_output) {
|
|||
free(output);
|
||||
}
|
||||
|
||||
void wlr_wl_output_update_cursor(struct wlr_wl_backend_output *output) {
|
||||
void wl_output_update_cursor(struct wlr_wl_backend_output *output) {
|
||||
if (output->backend->pointer && output->enter_serial) {
|
||||
wl_pointer_set_cursor(output->backend->pointer, output->enter_serial,
|
||||
output->cursor.surface, output->cursor.hotspot_x,
|
||||
|
|
@ -200,7 +200,7 @@ void wlr_wl_output_update_cursor(struct wlr_wl_backend_output *output) {
|
|||
}
|
||||
}
|
||||
|
||||
bool wlr_wl_output_move_cursor(struct wlr_output *_output, int x, int y) {
|
||||
bool wl_output_move_cursor(struct wlr_output *_output, int x, int y) {
|
||||
// TODO: only return true if x == current x and y == current y
|
||||
return true;
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ static struct wlr_output_impl output_impl = {
|
|||
.make_current = wlr_wl_output_make_current,
|
||||
.swap_buffers = wlr_wl_output_swap_buffers,
|
||||
.set_cursor = wlr_wl_output_set_cursor,
|
||||
.move_cursor = wlr_wl_output_move_cursor,
|
||||
.move_cursor = wl_output_move_cursor,
|
||||
};
|
||||
|
||||
bool wlr_output_is_wl(struct wlr_output *wlr_output) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static const struct wl_registry_listener registry_listener = {
|
|||
.global_remove = registry_global_remove
|
||||
};
|
||||
|
||||
void wlr_wl_registry_poll(struct wlr_wl_backend *backend) {
|
||||
void wl_registry_poll(struct wlr_wl_backend *backend) {
|
||||
wl_registry_add_listener(backend->registry, ®istry_listener, backend);
|
||||
wl_display_dispatch(backend->remote_display);
|
||||
wl_display_roundtrip(backend->remote_display);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
|
|||
assert(dev && dev->pointer);
|
||||
struct wlr_wl_pointer *wlr_wl_pointer = (struct wlr_wl_pointer *)dev->pointer;
|
||||
struct wlr_wl_backend_output *output =
|
||||
wlr_wl_output_for_surface(wlr_wl_dev->backend, surface);
|
||||
wl_output_for_surface(wlr_wl_dev->backend, surface);
|
||||
if (!output) {
|
||||
// GNOME sends a pointer enter when the surface is being destroyed
|
||||
return;
|
||||
|
|
@ -33,7 +33,7 @@ static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
|
|||
&wlr_wl_pointer->output_destroy_listener);
|
||||
wlr_wl_pointer->current_output = output;
|
||||
output->enter_serial = serial;
|
||||
wlr_wl_output_update_cursor(output);
|
||||
wl_output_update_cursor(output);
|
||||
}
|
||||
|
||||
static void pointer_handle_leave(void *data, struct wl_pointer *wl_pointer,
|
||||
|
|
@ -70,7 +70,7 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
|||
box.y /= wlr_output->scale;
|
||||
|
||||
struct wlr_box layout_box;
|
||||
wlr_wl_output_layout_get_box(wlr_wl_pointer->current_output->backend,
|
||||
wl_output_layout_get_box(wlr_wl_pointer->current_output->backend,
|
||||
&layout_box);
|
||||
|
||||
double ox = wlr_output->lx / (double)layout_box.width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue