Commit 84903a96 authored by Erwan Tulou's avatar Erwan Tulou

skins2(Linux): set _NET_WM_PID in any case

whatever the window manager says (in _NET_SUPPORTED), setting it is never harmful. It may even be useful in some situations.

pointed out by courmisch
(cherry picked from commit 3c73117a)
parent 766d4696
......@@ -253,6 +253,9 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
// test EWMH capabilities
testEWMH();
// Force _NET_WM_PID whatever the WM _NET_SUPPORTED says
m_net_wm_pid = XInternAtom( m_pDisplay, "_NET_WM_PID" , False );
}
}
......
......@@ -34,6 +34,7 @@
#include "x11_dragdrop.hpp"
#include "x11_factory.hpp"
#include <assert.h>
X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
X11Display &rDisplay, bool dragDrop, bool playOnDrop,
......@@ -184,12 +185,10 @@ X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
delete[] hostname;
// initialize EWMH pid
if( NET_WM_PID != None )
{
pid_t pid = getpid();
XChangeProperty( XDISPLAY, m_wnd, NET_WM_PID, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)&pid, 1 );
}
pid_t pid = getpid();
assert( NET_WM_PID != None );
XChangeProperty( XDISPLAY, m_wnd, NET_WM_PID, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)&pid, 1 );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment