mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
input: support tablet tool motion configuration
This commit is contained in:
parent
a2f25bea1a
commit
96701f1e27
1 changed files with 4 additions and 3 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
|
|
||||||
static enum motion
|
static enum motion
|
||||||
tool_motion_mode(struct wlr_tablet_tool *tool)
|
tool_motion_mode(enum motion motion, struct wlr_tablet_tool *tool)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Absolute positioning doesn't make sense
|
* Absolute positioning doesn't make sense
|
||||||
|
|
@ -31,7 +31,7 @@ tool_motion_mode(struct wlr_tablet_tool *tool)
|
||||||
case WLR_TABLET_TOOL_TYPE_LENS:
|
case WLR_TABLET_TOOL_TYPE_LENS:
|
||||||
return LAB_TABLET_MOTION_RELATIVE;
|
return LAB_TABLET_MOTION_RELATIVE;
|
||||||
default:
|
default:
|
||||||
return LAB_TABLET_MOTION_ABSOLUTE;
|
return motion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -235,7 +235,8 @@ handle_proximity(struct wl_listener *listener, void *data)
|
||||||
struct drawing_tablet_tool *tool = ev->tool->data;
|
struct drawing_tablet_tool *tool = ev->tool->data;
|
||||||
|
|
||||||
if (ev->state == WLR_TABLET_TOOL_PROXIMITY_IN) {
|
if (ev->state == WLR_TABLET_TOOL_PROXIMITY_IN) {
|
||||||
tablet->motion_mode = tool_motion_mode(ev->tool);
|
tablet->motion_mode =
|
||||||
|
tool_motion_mode(rc.tablet_tool.motion, ev->tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue