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>
67 lines
2.1 KiB
C
67 lines
2.1 KiB
C
/*
|
|
* panes.c -- dtsystemsettings: the panes and their categories (panes.h)
|
|
*
|
|
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
|
|
*
|
|
* One place for the computer's settings, in four rows. A pane is drawn
|
|
* here (sound, network, Bluetooth, date and time, about) when the setting
|
|
* goes through McdeSys; the panes that are CDE's own style manager open it
|
|
* until they are drawn here too.
|
|
*/
|
|
|
|
#include <string.h>
|
|
|
|
#include "panes.h"
|
|
|
|
const char *const categoryNames[CAT_COUNT] = {
|
|
"Personal",
|
|
"Hardware",
|
|
"Internet & Network",
|
|
"System"
|
|
};
|
|
|
|
const Pane panes[] = {
|
|
{ "appearance", "Appearance", CAT_PERSONAL, "DtColor.pm", PANE_COMMAND,
|
|
"dtstyle" },
|
|
{ "desktop", "Desktop", CAT_PERSONAL, "DtBkdrp.pm", PANE_COMMAND,
|
|
"dtstyle" },
|
|
{ "fonts", "Fonts", CAT_PERSONAL, "DtFont.pm", PANE_COMMAND, "dtstyle" },
|
|
{ "language", "Language", CAT_PERSONAL, "DtI18N.pm", PANE_COMMAND,
|
|
"dtstyle" },
|
|
{ "screensaver", "Screen Saver", CAT_PERSONAL, "DtScrn.pm",
|
|
PANE_COMMAND, "dtstyle" },
|
|
|
|
{ "sound", "Sound", CAT_HARDWARE, "Dtaudio.m.pm", PANE_OWN, NULL },
|
|
{ "keyboard", "Keyboard", CAT_HARDWARE, "DtKeybd.pm", PANE_OWN, NULL },
|
|
{ "mouse", "Mouse", CAT_HARDWARE, "DtMouse.pm", PANE_OWN, NULL },
|
|
{ "printers", "Printers", CAT_HARDWARE, "Dtprint.m.pm", PANE_COMMAND,
|
|
"dtprintinfo -all" },
|
|
|
|
{ "network", "Network", CAT_NETWORK, "McdeWired.m.pm", PANE_OWN, NULL },
|
|
{ "bluetooth", "Bluetooth", CAT_NETWORK, "McdeBluetooth.m.pm",
|
|
PANE_OWN, NULL },
|
|
|
|
{ "datetime", "Date & Time", CAT_SYSTEM, "Dtdate.m.pm", PANE_OWN, NULL },
|
|
{ "startup", "Startup", CAT_SYSTEM, "DtStart.pm", PANE_COMMAND,
|
|
"dtstyle" },
|
|
{ "accounts", "Accounts", CAT_SYSTEM, "DtStart.pm", PANE_OWN, NULL },
|
|
{ "update", "Software Update", CAT_SYSTEM, "Dtstyle.m.pm", PANE_OWN,
|
|
NULL },
|
|
{ "about", "About", CAT_SYSTEM, "MakronixDtlogo.m.pm", PANE_OWN, NULL },
|
|
};
|
|
|
|
const int paneCount = (int) (sizeof panes / sizeof panes[0]);
|
|
|
|
const Pane *
|
|
PaneFind(const char *id)
|
|
{
|
|
int i;
|
|
|
|
if (id == NULL)
|
|
return NULL;
|
|
for (i = 0; i < paneCount; i++)
|
|
if (strcmp(panes[i].id, id) == 0)
|
|
return &panes[i];
|
|
return NULL;
|
|
}
|