aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/backend.c28
-rw-r--r--backend/x11/input_device.c8
-rw-r--r--backend/x11/output.c4
3 files changed, 20 insertions, 20 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index 3a409155..35d037b0 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -22,7 +22,7 @@
#include "backend/x11.h"
#include "util/signal.h"
-struct wlr_x11_output *x11_output_from_window_id(struct wlr_x11_backend *x11,
+struct wlr_x11_output *get_x11_output_from_window_id(struct wlr_x11_backend *x11,
xcb_window_t window) {
struct wlr_x11_output *output;
wl_list_for_each(output, &x11->outputs, link) {
@@ -33,7 +33,7 @@ struct wlr_x11_output *x11_output_from_window_id(struct wlr_x11_backend *x11,
return NULL;
}
-void x11_output_layout_get_box(struct wlr_x11_backend *backend,
+void get_x11_output_layout_box(struct wlr_x11_backend *backend,
struct wlr_box *box) {
int min_x = INT_MAX, min_y = INT_MAX;
int max_x = INT_MIN, max_y = INT_MIN;
@@ -67,13 +67,13 @@ void x11_output_layout_get_box(struct wlr_x11_backend *backend,
static void handle_x11_event(struct wlr_x11_backend *x11,
xcb_generic_event_t *event) {
- x11_handle_input_event(x11, event);
+ handle_x11_input_event(x11, event);
switch (event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) {
case XCB_EXPOSE: {
xcb_expose_event_t *ev = (xcb_expose_event_t *)event;
struct wlr_x11_output *output =
- x11_output_from_window_id(x11, ev->window);
+ get_x11_output_from_window_id(x11, ev->window);
if (output != NULL) {
wlr_output_update_needs_swap(&output->wlr_output);
}
@@ -83,9 +83,9 @@ static void handle_x11_event(struct wlr_x11_backend *x11,
xcb_configure_notify_event_t *ev =
(xcb_configure_notify_event_t *)event;
struct wlr_x11_output *output =
- x11_output_from_window_id(x11, ev->window);
+ get_x11_output_from_window_id(x11, ev->window);
if (output != NULL) {
- x11_output_handle_configure_notify(output, ev);
+ handle_x11_configure_notify(output, ev);
}
break;
}
@@ -93,7 +93,7 @@ static void handle_x11_event(struct wlr_x11_backend *x11,
xcb_client_message_event_t *ev = (xcb_client_message_event_t *)event;
if (ev->data.data32[0] == x11->atoms.wm_delete_window) {
struct wlr_x11_output *output =
- x11_output_from_window_id(x11, ev->window);
+ get_x11_output_from_window_id(x11, ev->window);
if (output != NULL) {
wlr_output_destroy(&output->wlr_output);
}
@@ -120,7 +120,7 @@ static int x11_event(int fd, uint32_t mask, void *data) {
return 0;
}
-static bool wlr_x11_backend_start(struct wlr_backend *backend) {
+static bool backend_start(struct wlr_backend *backend) {
struct wlr_x11_backend *x11 = (struct wlr_x11_backend *)backend;
x11->started = true;
@@ -209,7 +209,7 @@ static bool wlr_x11_backend_start(struct wlr_backend *backend) {
return true;
}
-static void wlr_x11_backend_destroy(struct wlr_backend *backend) {
+static void backend_destroy(struct wlr_backend *backend) {
if (!backend) {
return;
}
@@ -251,16 +251,16 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) {
free(x11);
}
-static struct wlr_renderer *wlr_x11_backend_get_renderer(
+static struct wlr_renderer *backend_get_renderer(
struct wlr_backend *backend) {
struct wlr_x11_backend *x11 = (struct wlr_x11_backend *)backend;
return x11->renderer;
}
static const struct wlr_backend_impl backend_impl = {
- .start = wlr_x11_backend_start,
- .destroy = wlr_x11_backend_destroy,
- .get_renderer = wlr_x11_backend_get_renderer,
+ .start = backend_start,
+ .destroy = backend_destroy,
+ .get_renderer = backend_get_renderer,
};
bool wlr_backend_is_x11(struct wlr_backend *backend) {
@@ -270,7 +270,7 @@ bool wlr_backend_is_x11(struct wlr_backend *backend) {
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_x11_backend *x11 =
wl_container_of(listener, x11, display_destroy);
- wlr_x11_backend_destroy(&x11->backend);
+ backend_destroy(&x11->backend);
}
struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c
index 4433568d..5de5b4c2 100644
--- a/backend/x11/input_device.c
+++ b/backend/x11/input_device.c
@@ -40,7 +40,7 @@ static void x11_handle_pointer_position(struct wlr_x11_output *output,
box.y /= wlr_output->scale;
struct wlr_box layout_box;
- x11_output_layout_get_box(x11, &layout_box);
+ get_x11_output_layout_box(x11, &layout_box);
double ox = wlr_output->lx / (double)layout_box.width;
double oy = wlr_output->ly / (double)layout_box.height;
@@ -56,7 +56,7 @@ static void x11_handle_pointer_position(struct wlr_x11_output *output,
x11->time = time;
}
-void x11_handle_input_event(struct wlr_x11_backend *x11,
+void handle_x11_input_event(struct wlr_x11_backend *x11,
xcb_generic_event_t *event) {
switch (event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) {
case XCB_KEY_PRESS:
@@ -116,7 +116,7 @@ void x11_handle_input_event(struct wlr_x11_backend *x11,
xcb_motion_notify_event_t *ev = (xcb_motion_notify_event_t *)event;
struct wlr_x11_output *output =
- x11_output_from_window_id(x11, ev->event);
+ get_x11_output_from_window_id(x11, ev->event);
if (output != NULL) {
x11_handle_pointer_position(output, ev->event_x, ev->event_y, ev->time);
}
@@ -138,7 +138,7 @@ void x11_handle_input_event(struct wlr_x11_backend *x11,
const struct wlr_input_device_impl input_device_impl = { 0 };
-void x11_update_pointer_position(struct wlr_x11_output *output,
+void update_x11_pointer_position(struct wlr_x11_output *output,
xcb_timestamp_t time) {
struct wlr_x11_backend *x11 = output->x11;
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 77b4fb07..1f61c5e9 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -164,13 +164,13 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
return wlr_output;
}
-void x11_output_handle_configure_notify(struct wlr_x11_output *output,
+void handle_x11_configure_notify(struct wlr_x11_output *output,
xcb_configure_notify_event_t *ev) {
wlr_output_update_custom_mode(&output->wlr_output, ev->width,
ev->height, output->wlr_output.refresh);
// Move the pointer to its new location
- x11_update_pointer_position(output, output->x11->time);
+ update_x11_pointer_position(output, output->x11->time);
}
bool wlr_output_is_x11(struct wlr_output *wlr_output) {