Commit 0cd04434 authored by Cyril Deguet's avatar Cyril Deguet

* x11_display.cpp: support 15bpp mode for X11 skins and avoid a segfault

    when a mode is not supported (closes bug #1809). Move the "main window"
    outside the screen to avoid seeing it in the workspace selector applet.
parent cb98a99c
......@@ -106,6 +106,7 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
m_pixelSize = 1;
break;
case 15:
case 16:
case 24:
case 32:
......@@ -135,7 +136,7 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
m_pixelSize = 1;
}
if( depth == 16 )
if( depth == 15 || depth == 16 )
{
if( order == MSBFirst )
{
......@@ -180,7 +181,6 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
xgcvalues.graphics_exposures = False;
m_gc = XCreateGC( m_pDisplay, DefaultRootWindow( m_pDisplay ),
GCGraphicsExposures, &xgcvalues );
}
// Create a parent window to have a single task in the task bar
XSetWindowAttributes attr;
......@@ -215,6 +215,10 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
ShapeSet );
// Map the window
XMapWindow( m_pDisplay, m_mainWindow);
// Move it outside the screen to avoid seeing it in workspace selector
XMoveWindow( m_pDisplay, m_mainWindow, -10, -10 );
}
}
......
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