Commit c68fed3f13ca1335af548b88da72c27362d10ebd
- Diff rendering mode:
- inline
- side by side
include/wacom-properties.h
(6 / 0)
|   | |||
| 78 | 78 | */ | |
| 79 | 79 | #define WACOM_PROP_BUTTON_ACTIONS "Wacom Button Actions" | |
| 80 | 80 | ||
| 81 | /* 8 bit, 2 values, priv->debugLevel and common->debugLevel. This property | ||
| 82 | * is for use in the driver only and only enabled if --enable-debug is | ||
| 83 | * given. No client may rely on this property being present or working. | ||
| 84 | */ | ||
| 85 | #define WACOM_PROP_DEBUGLEVELS "Wacom Debug Levels" | ||
| 86 | |||
| 81 | 87 | #endif |
src/wcmXCommand.c
(27 / 0)
|   | |||
| 160 | 160 | Atom prop_hover; | |
| 161 | 161 | Atom prop_tooltype; | |
| 162 | 162 | Atom prop_btnactions; | |
| 163 | #ifdef DEBUG | ||
| 164 | Atom prop_debuglevels; | ||
| 165 | #endif | ||
| 163 | 166 | ||
| 164 | 167 | /* Special case: format -32 means type is XA_ATOM */ | |
| 165 | 168 | static Atom InitWcmAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values) | |
| … | … | ||
| 291 | 291 | /* default to no actions */ | |
| 292 | 292 | memset(values, 0, sizeof(values)); | |
| 293 | 293 | prop_btnactions = InitWcmAtom(local->dev, WACOM_PROP_BUTTON_ACTIONS, -32, WCM_MAX_MOUSE_BUTTONS, values); | |
| 294 | |||
| 295 | #ifdef DEBUG | ||
| 296 | values[0] = priv->debugLevel; | ||
| 297 | values[1] = common->debugLevel; | ||
| 298 | prop_debuglevels = InitWcmAtom(local->dev, WACOM_PROP_DEBUGLEVELS, 8, 2, values); | ||
| 299 | #endif | ||
| 294 | 300 | } | |
| 295 | 301 | ||
| 296 | 302 | int xf86WcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, | |
| … | … | ||
| 608 | 608 | /* reset screen info */ | |
| 609 | 609 | xf86WcmChangeScreen(local, priv->screen_no); | |
| 610 | 610 | } | |
| 611 | #ifdef DEBUG | ||
| 612 | } else if (property == prop_debuglevels) | ||
| 613 | { | ||
| 614 | CARD8 *values; | ||
| 615 | |||
| 616 | if (prop->size != 2 || prop->format != 8) | ||
| 617 | return BadMatch; | ||
| 618 | |||
| 619 | values = (CARD8*)prop->data; | ||
| 620 | if (values[0] > 10 || values[1] > 10) | ||
| 621 | return BadValue; | ||
| 622 | |||
| 623 | if (!checkonly) | ||
| 624 | { | ||
| 625 | priv->debugLevel = values[0]; | ||
| 626 | common->debugLevel = values[1]; | ||
| 627 | } | ||
| 628 | #endif | ||
| 611 | 629 | } else if (property == prop_btnactions) | |
| 612 | 630 | { | |
| 613 | 631 | Atom *values; |
tools/xsetwacom.c
(6 / 4)
|   | |||
| 309 | 309 | .name = "DebugLevel", | |
| 310 | 310 | .desc = "Level of debugging trace for individual devices, " | |
| 311 | 311 | "default is 0 (off). ", | |
| 312 | .set_func = not_implemented, | ||
| 313 | .get_func = not_implemented, | ||
| 312 | .prop_name = WACOM_PROP_DEBUGLEVELS, | ||
| 313 | .prop_format = 8, | ||
| 314 | .prop_offset = 0, | ||
| 314 | 315 | }, | |
| 315 | 316 | { | |
| 316 | 317 | .name = "CommonDBG", | |
| 317 | 318 | .desc = "Level of debugging statements applied to all devices " | |
| 318 | 319 | "associated with the same tablet. default is 0 (off). ", | |
| 319 | .set_func = not_implemented, | ||
| 320 | .get_func = not_implemented, | ||
| 320 | .prop_name = WACOM_PROP_DEBUGLEVELS, | ||
| 321 | .prop_format = 8, | ||
| 322 | .prop_offset = 1, | ||
| 321 | 323 | }, | |
| 322 | 324 | { | |
| 323 | 325 | .name = "Suppress", |

