]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/x11/x11_window.cpp
skins2(Linux): add WM_CLASS and _NET_WM_PID properties to skins2 windows
[vlc] / modules / gui / skins2 / x11 / x11_window.cpp
index d450d0d9cd7d86fbd65d4ddc52504875a63c0a29..f45609c200991b1ebf1a26c4b327c9764b99456c 100644 (file)
@@ -158,6 +158,17 @@ X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
     // Associate the window to the main "parent" window
     XSetTransientForHint( XDISPLAY, m_wnd, m_rDisplay.getMainWindow() );
 
+    // initialize Class Hint
+    XClassHint classhint;
+    classhint.res_name = (char*) "vlc";
+    classhint.res_class = (char*) "Vlc";
+    XSetClassHint( XDISPLAY, m_wnd, &classhint );
+
+    // initialize EWMH pid
+    pid_t pid = getpid();
+    XChangeProperty( XDISPLAY, m_wnd, NET_WM_PID, XA_CARDINAL, 32,
+                     PropModeReplace, (unsigned char *)&pid, 1 );
+
 }