クラス名の修正
諏訪子 <suwako@076.moe>、2026-01-16 04:17
コミット bfb1a467a45148ea180ae49521e3f635fb330511
・親 ff6b1d3
・ファイルを見る
4個のファイル、+16 -0
変更
CHANGELOG.md
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | # 0.2.1 (2026/01/16) |
| 2 | 2 | * DWMでうまく表示する様に |
| 3 | 3 | * あたしのDWMテーマに合わせる |
| 4 | +* クラス名の修正 | |
| 4 | 5 | |
| 5 | 6 | # 0.2.0 (2025/07/07) |
| 6 | 7 | * .desktopファイルがなければ、$PATHから実効してみる様に |
変更
main.c
| @@ -17,6 +17,7 @@ | ||
| 17 | 17 | |
| 18 | 18 | const char *sofname = "um"; |
| 19 | 19 | const char *version = "0.2.1"; |
| 20 | +const char *disname = "Unix Menu"; | |
| 20 | 21 | |
| 21 | 22 | int main() { |
| 22 | 23 | Display *display; |
| @@ -56,6 +57,20 @@ | ||
| 56 | 57 | |
| 57 | 58 | XChangeProperty(display, window, net_wm_window_type, XA_ATOM, 32, |
| 58 | 59 | PropModeReplace, (unsigned char *)&dialog, 1); |
| 60 | + | |
| 61 | + XStoreName(display, window, disname); | |
| 62 | + Atom net_wm_name = XInternAtom(display, "_NET_WM_NAME", False); | |
| 63 | + XChangeProperty(display, window, net_wm_name, | |
| 64 | + XInternAtom(display, "UTF8_STRING", False), 8, | |
| 65 | + PropModeReplace, (unsigned char *)disname, strlen(disname)); | |
| 66 | + | |
| 67 | + XClassHint *classHint = XAllocClassHint(); | |
| 68 | + if (classHint) { | |
| 69 | + classHint->res_name = "um"; | |
| 70 | + classHint->res_class = "UnixMenu"; | |
| 71 | + XSetClassHint(display, window, classHint); | |
| 72 | + XFree(classHint); | |
| 73 | + } | |
| 59 | 74 | |
| 60 | 75 | XSetWindowBackground(display, window, BGCOL); |
| 61 | 76 |
変更
scrot1.png
バイナリファイル
変更
scrot2.png
バイナリファイル