Add NeoNet Yabasic networking FFI library, fix fcitx5 service and WM context menus, install yabasic-doc and mandoc

This commit is contained in:
Luxferre committed 2026-10-27 07:39:07 +02:00
1 parent fb3723fab4
commit 726500085a
33 files changed
+2617 -69

No files matched your search

+69 -2
View File
@@ -73,7 +73,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel, SchemeTabActive, SchemeTabInactive }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
NetWMWindowTypeDialog, NetClientList, NetDwmCmd, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
@@ -276,6 +276,7 @@ static void readxresources(void);
static void reload_dwm_theme(void);
static void load_plugins(void);
static void unload_plugins(void);
static long long dwm_now_ms(void);
static pid_t getparentprocess(pid_t p);
static int isdescprocess(pid_t p, pid_t c);
@@ -784,8 +785,73 @@ void
clientmessage(XEvent *e)
{
XClientMessageEvent *cme = &e->xclient;
Client *c = wintoclient(cme->window);
Client *c;
if (cme->message_type == netatom[NetDwmCmd]) {
long op = cme->data.l[0];
long argval = cme->data.l[1];
if (op == 1 && argval >= 1 && argval <= 9) {
Arg a = { .ui = 1U << (argval - 1) };
tag(&a);
} else if (op == 2 && argval >= 1 && argval <= 9) {
Arg a = { .ui = 1U << (argval - 1) };
view(&a);
} else if (op == 3) {
Arg a = { .i = (argval != 0) ? (int)argval : +1 };
focusstack(&a);
} else if (op == 4) {
Arg a = { .i = +1 };
cyclelayout(&a);
} else if (op == 5) {
static Window last_kill_win = None;
static long long last_kill_ms = 0;
Client *tc = (argval != 0) ? wintoclient((Window)argval) : NULL;
if (!tc && selmon)
tc = selmon->sel;
if (tc) {
if (selmon && selmon->sel != tc)
focus(tc);
long long now = dwm_now_ms();
int force = (tc->win == last_kill_win && (now - last_kill_ms) < 3000LL);
last_kill_win = tc->win;
last_kill_ms = now;
if (force || !sendevent(tc, wmatom[WMDelete])) {
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XSetCloseDownMode(dpy, DestroyAll);
XKillClient(dpy, tc->win);
XSync(dpy, False);
XSetErrorHandler(xerror);
XUngrabServer(dpy);
}
} else if (argval != 0 && (Window)argval != root &&
(!selmon || ((Window)argval != selmon->barwin &&
(Window)argval != selmon->softwin))) {
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XSetCloseDownMode(dpy, DestroyAll);
XKillClient(dpy, (Window)argval);
XSync(dpy, False);
XSetErrorHandler(xerror);
XUngrabServer(dpy);
}
} else if (op == 6) {
Arg a = { .i = +1 };
if (argval < 0)
pushup(&a);
else
pushdown(&a);
} else if (op == 7) {
Arg a = { .i = (argval < 0) ? -1 : +1 };
shiftview(&a);
} else if (op == 8) {
Arg a = { .i = (argval < 0) ? -1 : +1 };
clienttagpush(&a);
}
return;
}
c = wintoclient(cme->window);
if (!c)
return;
if (cme->message_type == netatom[NetWMState]) {
@@ -2694,6 +2760,7 @@ setup(void)
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
netatom[NetDwmCmd] = XInternAtom(dpy, "_BANANARCHY_DWM_CMD", False);
/* init cursors */
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
cursor[CurResize] = drw_cur_create(drw, XC_sizing);