Port away from DefaultScreen(display())

The screen number is provided through QX11Info.
This commit is contained in:
Martin Gräßlin 2014-04-25 11:37:09 +02:00
parent 3204342809
commit 88d55997f7
3 changed files with 3 additions and 3 deletions

View file

@ -166,7 +166,7 @@ extern bool is_multihead;
void Compositor::slotCompositingOptionsInitialized()
{
char selection_name[ 100 ];
sprintf(selection_name, "_NET_WM_CM_S%d", DefaultScreen(display()));
sprintf(selection_name, "_NET_WM_CM_S%d", QX11Info::appScreen());
if (!cm_selection) {
cm_selection = new CompositorSelectionOwner(selection_name);
connect(cm_selection, SIGNAL(lostOwnership()), SLOT(finish()));

View file

@ -73,7 +73,7 @@ void initGLX()
glXVersion = MAKE_GL_VERSION(major, minor, 0);
// Get list of supported GLX extensions
glxExtensions = QString::fromUtf8(glXQueryExtensionsString(
display(), DefaultScreen(display()))).split(QStringLiteral(" "));
display(), QX11Info::appScreen())).split(QStringLiteral(" "));
glxResolveFunctions();
#endif

View file

@ -83,7 +83,7 @@ KWinSelectionOwner::KWinSelectionOwner(int screen_P)
xcb_atom_t KWinSelectionOwner::make_selection_atom(int screen_P)
{
if (screen_P < 0)
screen_P = DefaultScreen(display());
screen_P = QX11Info::appScreen();
QByteArray screen(QByteArrayLiteral("WM_S"));
screen.append(QByteArray::number(screen_P));
ScopedCPointer<xcb_intern_atom_reply_t> atom(xcb_intern_atom_reply(