aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-29 08:00:59 -0400
committerGitHub <noreply@github.com>2018-04-29 08:00:59 -0400
commita0f490306395ac3705c00ecc85b4a0bba721886e (patch)
treef5893498ca64b24883e8a1b9f571ea54359efad3 /include
parent795d4071db1ae504e8f5748005513d89ec7064ea (diff)
parentf8e0a034512d4c5a69dde4f5cd02df53af216b72 (diff)
Merge pull request #926 from emersion/fix-x11-backend-memory-leaks
Fix some backend memory leaks
Diffstat (limited to 'include')
-rw-r--r--include/backend/x11.h2
-rw-r--r--include/wlr/interfaces/wlr_keyboard.h3
-rw-r--r--include/wlr/interfaces/wlr_pointer.h2
-rw-r--r--include/wlr/types/wlr_keyboard.h3
-rw-r--r--include/wlr/types/wlr_pointer.h2
5 files changed, 7 insertions, 5 deletions
diff --git a/include/backend/x11.h b/include/backend/x11.h
index 6ab1cec6..1d56fbe8 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -77,6 +77,8 @@ struct wlr_x11_output *get_x11_output_from_window_id(struct wlr_x11_backend *x11
void get_x11_output_layout_box(struct wlr_x11_backend *backend,
struct wlr_box *box);
+extern const struct wlr_keyboard_impl keyboard_impl;
+extern const struct wlr_pointer_impl pointer_impl;
extern const struct wlr_input_device_impl input_device_impl;
void handle_x11_input_event(struct wlr_x11_backend *x11,
diff --git a/include/wlr/interfaces/wlr_keyboard.h b/include/wlr/interfaces/wlr_keyboard.h
index 6960ea87..c9a13fd7 100644
--- a/include/wlr/interfaces/wlr_keyboard.h
+++ b/include/wlr/interfaces/wlr_keyboard.h
@@ -9,7 +9,8 @@ struct wlr_keyboard_impl {
void (*led_update)(struct wlr_keyboard *keyboard, uint32_t leds);
};
-void wlr_keyboard_init(struct wlr_keyboard *keyboard, struct wlr_keyboard_impl *impl);
+void wlr_keyboard_init(struct wlr_keyboard *keyboard,
+ const struct wlr_keyboard_impl *impl);
void wlr_keyboard_destroy(struct wlr_keyboard *keyboard);
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
struct wlr_event_keyboard_key *event);
diff --git a/include/wlr/interfaces/wlr_pointer.h b/include/wlr/interfaces/wlr_pointer.h
index af677b97..f0cf9081 100644
--- a/include/wlr/interfaces/wlr_pointer.h
+++ b/include/wlr/interfaces/wlr_pointer.h
@@ -8,7 +8,7 @@ struct wlr_pointer_impl {
};
void wlr_pointer_init(struct wlr_pointer *pointer,
- struct wlr_pointer_impl *impl);
+ const struct wlr_pointer_impl *impl);
void wlr_pointer_destroy(struct wlr_pointer *pointer);
#endif
diff --git a/include/wlr/types/wlr_keyboard.h b/include/wlr/types/wlr_keyboard.h
index ed0427e8..bfb4e611 100644
--- a/include/wlr/types/wlr_keyboard.h
+++ b/include/wlr/types/wlr_keyboard.h
@@ -40,8 +40,7 @@ struct wlr_keyboard_modifiers {
};
struct wlr_keyboard {
- struct wlr_keyboard_impl *impl;
- // TODO: Should this store key repeat info too?
+ const struct wlr_keyboard_impl *impl;
int keymap_fd;
size_t keymap_size;
diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h
index a8969b9e..45619e0a 100644
--- a/include/wlr/types/wlr_pointer.h
+++ b/include/wlr/types/wlr_pointer.h
@@ -8,7 +8,7 @@
struct wlr_pointer_impl;
struct wlr_pointer {
- struct wlr_pointer_impl *impl;
+ const struct wlr_pointer_impl *impl;
struct {
struct wl_signal motion;