Replace QX11Info::appScreen() with KWin::Application::x11ScreenNumber()

No need to go through QX11Info for information we have.
This commit is contained in:
Martin Gräßlin 2015-02-17 15:57:03 +01:00
parent c61ecc887a
commit c383d6074c
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KWIN_XCB_UTILS_H #define KWIN_XCB_UTILS_H
#include <kwinglobals.h> #include <kwinglobals.h>
#include "main.h"
#include <QRect> #include <QRect>
#include <QRegion> #include <QRegion>
@ -1713,7 +1714,7 @@ static inline int defaultDepth()
if (depth != 0) { if (depth != 0) {
return depth; return depth;
} }
int screen = QX11Info::appScreen(); int screen = Application::x11ScreenNumber();
for (xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(connection())); for (xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(connection()));
it.rem; it.rem;
--screen, xcb_screen_next(&it)) { --screen, xcb_screen_next(&it)) {