suwako / UnixMenu アーカイブ

このリポジトリはアーカイブされています。読むだけで、プッシュやイシューの変更は出来ません。

クラス名の修正

諏訪子 <suwako@076.moe>、2026-01-16 04:17
コミット bfb1a467a45148ea180ae49521e3f635fb330511 ・親 ff6b1d3 ・ファイルを見る

4個のファイル、+16 -0

変更 CHANGELOG.md
@@ -1,6 +1,7 @@
11 # 0.2.1 (2026/01/16)
22 * DWMでうまく表示する様に
33 * あたしのDWMテーマに合わせる
4+* クラス名の修正
45
56 # 0.2.0 (2025/07/07)
67 * .desktopファイルがなければ、$PATHから実効してみる様に
変更 main.c
@@ -17,6 +17,7 @@
1717
1818 const char *sofname = "um";
1919 const char *version = "0.2.1";
20+const char *disname = "Unix Menu";
2021
2122 int main() {
2223 Display *display;
@@ -56,6 +57,20 @@
5657
5758 XChangeProperty(display, window, net_wm_window_type, XA_ATOM, 32,
5859 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+ }
5974
6075 XSetWindowBackground(display, window, BGCOL);
6176
変更 scrot1.png

バイナリファイル

変更 scrot2.png

バイナリファイル