dtsystemsettings draws the Keyboard pane (key repeat, its delay and rate, key click, a field to try it) and the Mouse pane (primary button, pointer speed, threshold, double-click time) instead of opening dtstyle. A change takes effect at once through Xlib and goes to dtsession as dtstyle sends it (_DT_SM_KEYBOARD_INFO, _DT_SM_POINTER_INFO; *multiClickTime through _DtAddToResource). dtsession saves and restores the XKB repeat delay and interval (XkbGetAutoRepeatRate at logout, XkbSetAutoRepeatRate at login), which the core keyboard state does not carry. And it keeps every pointer button: the map was char[5], the parse of the property wrote past it without a bound, and the restore cut the map to 5, which the server refuses on a mouse with more buttons. Measured on Xvfb (build/mcde-shots): the sliders set the server (xset q: delay 490, rate 29, click 20; acceleration 3/1, multiClickTime 280; xmodmap -pp 1->3, 3->1). Through a whole dtsession: logout wrote RepeatDelay 490, RepeatInterval 34, ButtonMap 3,2,1,4,...,10 (10 buttons), AccelNum 3; the next login restored delay 490 rate 29, acceleration 3/1 and the swapped buttons. The double-click time is saved (dt.resources) but its restore is not measured: a dtsession started without Xsession gets no resources loaded (3 in xrdb, against 108 in a real session). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.4 KiB
C
42 lines
1.4 KiB
C
/*
|
|
* ui.h -- dtsystemsettings: what the panes share (main.c)
|
|
*
|
|
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
|
|
*/
|
|
|
|
#ifndef _dtsystemsettings_ui_h
|
|
#define _dtsystemsettings_ui_h
|
|
|
|
#include <X11/Intrinsic.h>
|
|
#include <Xm/Xm.h>
|
|
|
|
extern XtAppContext app;
|
|
|
|
XmRenderTable PaneFont(Widget w, int size, Boolean bold);
|
|
Widget Text(Widget parent, const char *name, const char *text);
|
|
void SetText(Widget w, const char *text);
|
|
Widget Button(Widget parent, const char *label, XtCallbackProc cb,
|
|
XtPointer data);
|
|
Widget PaneButton(Widget parent, const char *label, XtCallbackProc cb,
|
|
XtPointer data);
|
|
Widget Table(Widget parent, const char *const *rows, int n, Widget *values);
|
|
Pixmap Icon(Widget w, const char *file);
|
|
void Spawn(const char *command);
|
|
|
|
/* a message in a small window; ERROR: an error */
|
|
void Message(Widget parent, const char *text, int error);
|
|
/* the command line that runs COMMAND as root in a terminal, after su(1)
|
|
* asked for the password there ("Unlock..."); into BUF */
|
|
void AsRoot(const char *title, const char *command, char *buf, size_t len);
|
|
|
|
/* the panes in accounts.c and update.c */
|
|
Widget MakeAccounts(Widget parent);
|
|
Widget MakeUpdate(Widget parent);
|
|
/* the panes in input.c */
|
|
Widget MakeKeyboard(Widget parent);
|
|
Widget MakeMouse(Widget parent);
|
|
/* dtsystemsettings -apply-update: what the terminal of "Update Now" runs */
|
|
int ApplyUpdate(void);
|
|
|
|
#endif /* _dtsystemsettings_ui_h */
|