… | |
… | |
185 | "INCR", |
185 | "INCR", |
186 | "WM_PROTOCOLS", |
186 | "WM_PROTOCOLS", |
187 | "WM_DELETE_WINDOW", |
187 | "WM_DELETE_WINDOW", |
188 | "CLIPBOARD", |
188 | "CLIPBOARD", |
189 | #if ENABLE_FRILLS |
189 | #if ENABLE_FRILLS |
|
|
190 | "_MOTIF_WM_HINTS", |
|
|
191 | #endif |
|
|
192 | #if ENABLE_EWMH |
190 | "_NET_WM_PID", |
193 | "_NET_WM_PID", |
191 | "_MOTIF_WM_HINTS", |
|
|
192 | "_NET_WM_NAME", |
194 | "_NET_WM_NAME", |
193 | "_NET_WM_ICON_NAME", |
195 | "_NET_WM_ICON_NAME", |
|
|
196 | "_NET_WM_PING", |
194 | #endif |
197 | #endif |
195 | #if USE_XIM |
198 | #if USE_XIM |
196 | "WM_LOCALE_NAME", |
199 | "WM_LOCALE_NAME", |
197 | #endif |
200 | #endif |
198 | #ifdef TRANSPARENT |
201 | #ifdef TRANSPARENT |
… | |
… | |
967 | mwmhints.flags = MWM_HINTS_DECORATIONS; |
970 | mwmhints.flags = MWM_HINTS_DECORATIONS; |
968 | mwmhints.decorations = 0; |
971 | mwmhints.decorations = 0; |
969 | } |
972 | } |
970 | } |
973 | } |
971 | else |
974 | else |
972 | { |
|
|
973 | mwmhints.flags = 0; |
975 | mwmhints.flags = 0; |
974 | } |
|
|
975 | #endif |
976 | #endif |
976 | |
977 | |
977 | /* grab colors before netscape does */ |
978 | /* grab colors before netscape does */ |
978 | Get_Colours (); |
979 | Get_Colours (); |
979 | |
980 | |
… | |
… | |
1036 | wmHint.window_group = top; |
1037 | wmHint.window_group = top; |
1037 | |
1038 | |
1038 | XmbSetWMProperties (disp, top, NULL, NULL, (char **)argv, argc, |
1039 | XmbSetWMProperties (disp, top, NULL, NULL, (char **)argv, argc, |
1039 | &szHint, &wmHint, &classHint); |
1040 | &szHint, &wmHint, &classHint); |
1040 | |
1041 | |
1041 | /* Enable delete window protocol */ |
1042 | Atom protocols[] = { |
1042 | XSetWMProtocols (disp, top, &xa[XA_WM_DELETE_WINDOW], 1); |
1043 | xa[XA_WM_DELETE_WINDOW], |
|
|
1044 | #if ENABLE_EWMH |
|
|
1045 | xa[XA_NET_WM_PING], |
|
|
1046 | #endif |
|
|
1047 | }; |
1043 | |
1048 | |
1044 | #if ENABLE_FRILLS |
1049 | XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0])); |
|
|
1050 | |
|
|
1051 | #if ENABLE_EWMH |
1045 | long pid = getpid (); |
1052 | long pid = getpid (); |
1046 | |
1053 | |
1047 | XChangeProperty (disp, top, |
1054 | XChangeProperty (disp, top, |
1048 | xa[XA_NET_WM_PID], XA_CARDINAL, 32, |
1055 | xa[XA_NET_WM_PID], XA_CARDINAL, 32, |
1049 | PropModeReplace, (unsigned char *)&pid, 1); |
1056 | PropModeReplace, (unsigned char *)&pid, 1); |
|
|
1057 | |
|
|
1058 | // _NET_WM_WINDOW_TYPE is NORMAL, which is the default |
1050 | #endif |
1059 | #endif |
1051 | |
1060 | |
1052 | XSelectInput (disp, top, |
1061 | XSelectInput (disp, top, |
1053 | KeyPressMask |
1062 | KeyPressMask |
1054 | #if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ENABLE_FRILLS || ISO_14755 |
1063 | #if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ENABLE_FRILLS || ISO_14755 |