* atom name here. do not change the order!
*/
static const gchar *atom_names[] = {
+ "_NET_WM_PID",
"_NET_WM_PING",
"_NET_WM_STATE",
"_NET_WM_STATE_FULLSCREEN",
(char **) atom_names, n_atom_names,
False, atoms);
- backend_x11->atom_NET_WM_PING = atoms[0];
- backend_x11->atom_NET_WM_STATE = atoms[1];
- backend_x11->atom_NET_WM_STATE_FULLSCREEN = atoms[2];
- backend_x11->atom_NET_WM_USER_TIME = atoms[3];
- backend_x11->atom_WM_PROTOCOLS = atoms[4];
- backend_x11->atom_WM_DELETE_WINDOW = atoms[5];
- backend_x11->atom_XEMBED = atoms[6];
- backend_x11->atom_XEMBED_INFO = atoms[7];
- backend_x11->atom_NET_WM_NAME = atoms[8];
- backend_x11->atom_UTF8_STRING = atoms[9];
+ backend_x11->atom_NET_WM_PID = atoms[0];
+ backend_x11->atom_NET_WM_PING = atoms[1];
+ backend_x11->atom_NET_WM_STATE = atoms[2];
+ backend_x11->atom_NET_WM_STATE_FULLSCREEN = atoms[3];
+ backend_x11->atom_NET_WM_USER_TIME = atoms[4];
+ backend_x11->atom_WM_PROTOCOLS = atoms[5];
+ backend_x11->atom_WM_DELETE_WINDOW = atoms[6];
+ backend_x11->atom_XEMBED = atoms[7];
+ backend_x11->atom_XEMBED_INFO = atoms[8];
+ backend_x11->atom_NET_WM_NAME = atoms[9];
+ backend_x11->atom_UTF8_STRING = atoms[10];
}
g_free (clutter_display_name);
}
static inline void
+set_wm_pid (ClutterStageX11 *stage_x11)
+{
+ ClutterBackendX11 *backend_x11 = stage_x11->backend;
+ long pid;
+
+ if (stage_x11->xwin == None)
+ return;
+
+ /* this will take care of WM_CLIENT_MACHINE and WM_LOCALE_NAME */
+ XSetWMProperties (stage_x11->xdpy, stage_x11->xwin,
+ NULL,
+ NULL,
+ NULL, 0,
+ NULL, NULL, NULL);
+
+ pid = getpid();
+ XChangeProperty (stage_x11->xdpy,
+ stage_x11->xwin,
+ backend_x11->atom_NET_WM_PID, XA_CARDINAL, 32,
+ PropModeReplace,
+ (guchar *) &pid, 1);
+}
+
+static inline void
set_wm_title (ClutterStageX11 *stage_x11)
{
ClutterBackendX11 *backend_x11 = stage_x11->backend;
{
ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (actor);
+ set_wm_pid (stage_x11);
set_wm_title (stage_x11);
set_cursor_visible (stage_x11);
}