mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-27 07:58:53 -04:00
Makes the compositor not crash whenever you close the tablet driver.
This is a duplicate of 92ed929a3c
This commit is contained in:
parent
6ce7a3d241
commit
096b8a38de
1 changed files with 12 additions and 4 deletions
|
|
@ -55,8 +55,16 @@ void createtablet(struct wlr_input_device *device) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroytablet(struct wl_listener *listener, void *data) { tablet = NULL; }
|
void destroytablet(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
|
|
||||||
|
wl_list_remove(&listener->link);
|
||||||
|
|
||||||
|
|
||||||
|
tablet = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
void destroytabletsurfacenotify(struct wl_listener *listener, void *data) {
|
void destroytabletsurfacenotify(struct wl_listener *listener, void *data) {
|
||||||
if (tablet_curr_surface)
|
if (tablet_curr_surface)
|
||||||
wl_list_remove(&destroy_tablet_surface_listener.link);
|
wl_list_remove(&destroy_tablet_surface_listener.link);
|
||||||
|
|
@ -69,10 +77,10 @@ void destroytablettool(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void tabletapplymap(double tablet_width, double tablet_height,
|
void tabletapplymap(double tablet_width, double tablet_height,
|
||||||
struct wlr_fbox box, double *x, double *y)
|
struct wlr_fbox box, double *x, double *y)
|
||||||
{
|
{
|
||||||
if ((!box.x && !box.y && !box.width && !box.height)
|
if ((!box.x && !box.y && !box.width && !box.height) || !tablet_width ||
|
||||||
|| !tablet_width || !tablet_height) {
|
!tablet_height) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue