mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
commit
d2e796edb7
14 changed files with 24 additions and 22 deletions
|
@ -3,8 +3,10 @@
|
||||||
|
|
||||||
struct wl_resource;
|
struct wl_resource;
|
||||||
|
|
||||||
// Implements the given resource as region.
|
/*
|
||||||
// Sets the associated pixman_region32_t as userdata.
|
* Implements the given resource as region.
|
||||||
|
* Sets the associated pixman_region32_t as userdata.
|
||||||
|
*/
|
||||||
void wlr_region_create(struct wl_client *client, struct wl_resource *res,
|
void wlr_region_create(struct wl_client *client, struct wl_resource *res,
|
||||||
uint32_t id);
|
uint32_t id);
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,9 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_image_ext() {
|
static void init_image_ext() {
|
||||||
if (glEGLImageTargetTexture2DOES)
|
if (glEGLImageTargetTexture2DOES) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const char *exts = (const char*) glGetString(GL_EXTENSIONS);
|
const char *exts = (const char*) glGetString(GL_EXTENSIONS);
|
||||||
if (strstr(exts, "GL_OES_EGL_image_external")) {
|
if (strstr(exts, "GL_OES_EGL_image_external")) {
|
||||||
|
|
|
@ -23,7 +23,10 @@ void wlr_input_device_init(struct wlr_input_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_input_device_destroy(struct wlr_input_device *dev) {
|
void wlr_input_device_destroy(struct wlr_input_device *dev) {
|
||||||
if (!dev) return;
|
if (!dev) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->_device) {
|
if (dev->_device) {
|
||||||
switch (dev->type) {
|
switch (dev->type) {
|
||||||
case WLR_INPUT_DEVICE_KEYBOARD:
|
case WLR_INPUT_DEVICE_KEYBOARD:
|
||||||
|
|
|
@ -11,8 +11,7 @@ void wlr_keyboard_init(struct wlr_keyboard *kb,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_keyboard_destroy(struct wlr_keyboard *kb) {
|
void wlr_keyboard_destroy(struct wlr_keyboard *kb) {
|
||||||
if (!kb) return;
|
if (kb && kb->impl && kb->impl->destroy) {
|
||||||
if (kb->impl && kb->impl->destroy) {
|
|
||||||
kb->impl->destroy(kb);
|
kb->impl->destroy(kb);
|
||||||
} else {
|
} else {
|
||||||
free(kb);
|
free(kb);
|
||||||
|
|
|
@ -14,8 +14,7 @@ void wlr_pointer_init(struct wlr_pointer *pointer,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_pointer_destroy(struct wlr_pointer *pointer) {
|
void wlr_pointer_destroy(struct wlr_pointer *pointer) {
|
||||||
if (!pointer) return;
|
if (pointer && pointer->impl && pointer->impl->destroy) {
|
||||||
if (pointer->impl && pointer->impl->destroy) {
|
|
||||||
pointer->impl->destroy(pointer);
|
pointer->impl->destroy(pointer);
|
||||||
} else {
|
} else {
|
||||||
free(pointer);
|
free(pointer);
|
||||||
|
|
|
@ -13,8 +13,7 @@ void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) {
|
void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) {
|
||||||
if (!pad) return;
|
if (pad && pad->impl && pad->impl->destroy) {
|
||||||
if (pad->impl && pad->impl->destroy) {
|
|
||||||
pad->impl->destroy(pad);
|
pad->impl->destroy(pad);
|
||||||
} else {
|
} else {
|
||||||
free(pad);
|
free(pad);
|
||||||
|
|
|
@ -14,8 +14,7 @@ void wlr_touch_init(struct wlr_touch *touch,
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_touch_destroy(struct wlr_touch *touch) {
|
void wlr_touch_destroy(struct wlr_touch *touch) {
|
||||||
if (!touch) return;
|
if (touch && touch->impl && touch->impl->destroy) {
|
||||||
if (touch->impl && touch->impl->destroy) {
|
|
||||||
touch->impl->destroy(touch);
|
touch->impl->destroy(touch);
|
||||||
} else {
|
} else {
|
||||||
free(touch);
|
free(touch);
|
||||||
|
|
Loading…
Reference in a new issue