Commit 2601e8a6 authored by Erwan Tulou's avatar Erwan Tulou Committed by Jean-Baptiste Kempf

skins2(Linux): add WM_CLASS and _NET_WM_PID properties to skins2 windows

This patch refers to trac #3594.
Tests required to ensure that it really solves the "Docky" issue
(cherry picked from commit 7df2787075068f51894e1332f8be8b2b43769d80)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d67346a2
...@@ -306,6 +306,8 @@ void X11Display::testEWMH() ...@@ -306,6 +306,8 @@ void X11Display::testEWMH()
TEST_EWMH( m_net_wm_window_opacity, "_NET_WM_WINDOW_OPACITY" ) TEST_EWMH( m_net_wm_window_opacity, "_NET_WM_WINDOW_OPACITY" )
TEST_EWMH( m_net_wm_pid, "_NET_WM_PID" )
#undef TEST_EWMH #undef TEST_EWMH
XFree( p_args.p_atom ); XFree( p_args.p_atom );
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#define NET_WM_STAYS_ON_TOP m_rDisplay.m_net_wm_stays_on_top #define NET_WM_STAYS_ON_TOP m_rDisplay.m_net_wm_stays_on_top
#define NET_WM_WINDOW_OPACITY m_rDisplay.m_net_wm_window_opacity #define NET_WM_WINDOW_OPACITY m_rDisplay.m_net_wm_window_opacity
#define NET_WM_PID m_rDisplay.m_net_wm_pid
/// Class for encapsulation of a X11 Display /// Class for encapsulation of a X11 Display
class X11Display: public SkinObject class X11Display: public SkinObject
...@@ -94,6 +95,8 @@ public: ...@@ -94,6 +95,8 @@ public:
Atom m_net_wm_stays_on_top; Atom m_net_wm_stays_on_top;
Atom m_net_wm_window_opacity; Atom m_net_wm_window_opacity;
Atom m_net_wm_pid;
/// test EWMH capabilities /// test EWMH capabilities
void testEWMH(); void testEWMH();
......
...@@ -158,6 +158,17 @@ X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow, ...@@ -158,6 +158,17 @@ X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
// Associate the window to the main "parent" window // Associate the window to the main "parent" window
XSetTransientForHint( XDISPLAY, m_wnd, m_rDisplay.getMainWindow() ); 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 );
} }
......
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