Mercurial > emacs
comparison src/xfns.c @ 111439:8426207480fa
* src/xfns.c (set_machine_and_pid_properties): Let X set WM_CLIENT_MACHINE.
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Sun, 07 Nov 2010 12:25:55 +0100 |
parents | 6316c70b291e |
children | 132f2dfd549f |
comparison
equal
deleted
inserted
replaced
111438:381161c05d64 | 111439:8426207480fa |
---|---|
3076 } | 3076 } |
3077 | 3077 |
3078 static void | 3078 static void |
3079 set_machine_and_pid_properties (struct frame *f) | 3079 set_machine_and_pid_properties (struct frame *f) |
3080 { | 3080 { |
3081 /* See the above comment "Note: Encoding strategy". */ | |
3082 XTextProperty text; | |
3083 int bytes, stringp; | |
3084 int do_free_text_value = 0; | |
3085 long pid = (long) getpid (); | 3081 long pid = (long) getpid (); |
3086 | 3082 |
3087 text.value = x_encode_text (Vsystem_name, | 3083 /* This will set WM_CLIENT_MACHINE and WM_LOCALE_NAME. */ |
3088 Qcompound_text, 0, &bytes, &stringp, | 3084 XSetWMProperties (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), NULL, NULL, |
3089 &do_free_text_value); | 3085 NULL, 0, NULL, NULL, NULL); |
3090 text.encoding = (stringp ? XA_STRING | |
3091 : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); | |
3092 text.format = 8; | |
3093 text.nitems = bytes; | |
3094 XSetWMClientMachine (FRAME_X_DISPLAY (f), | |
3095 FRAME_OUTER_WINDOW (f), | |
3096 &text); | |
3097 if (do_free_text_value) | |
3098 xfree (text.value); | |
3099 | |
3100 XChangeProperty (FRAME_X_DISPLAY (f), | 3086 XChangeProperty (FRAME_X_DISPLAY (f), |
3101 FRAME_OUTER_WINDOW (f), | 3087 FRAME_OUTER_WINDOW (f), |
3102 XInternAtom (FRAME_X_DISPLAY (f), | 3088 XInternAtom (FRAME_X_DISPLAY (f), |
3103 "_NET_WM_PID", | 3089 "_NET_WM_PID", |
3104 False), | 3090 False), |