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

No need to go through QX11Info for information we have.
icc-effect-5.14.5
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()
{
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) {
cm_selection = new CompositorSelectionOwner(selection_name);
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
#include <kwinglobals.h>
#include "main.h"
#include <QRect>
#include <QRegion>
@ -1713,7 +1714,7 @@ static inline int defaultDepth()
if (depth != 0) {
return depth;
}
int screen = QX11Info::appScreen();
int screen = Application::x11ScreenNumber();
for (xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(connection()));
it.rem;
--screen, xcb_screen_next(&it)) {