Complete port to Kephal.
svn path=/trunk/KDE/kdebase/workspace/; revision=884554
This commit is contained in:
parent
f780e8b68b
commit
c84d39b5df
2 changed files with 10 additions and 6 deletions
|
@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "client.h"
|
||||
#include "compositingprefs.h"
|
||||
|
||||
#include <kephal/screens.h>
|
||||
|
||||
#endif
|
||||
|
||||
namespace KWin
|
||||
|
@ -101,7 +103,7 @@ unsigned long Options::updateSettings()
|
|||
|
||||
placement = Placement::policyFromString( config.readEntry("Placement"), true );
|
||||
xineramaPlacementScreen = qBound( -1, config.readEntry( "XineramaPlacementScreen", -1 ),
|
||||
qApp->desktop()->numScreens() - 1 );
|
||||
Kephal::ScreenUtils::numScreens() - 1 );
|
||||
|
||||
if( focusPolicy == ClickToFocus )
|
||||
{
|
||||
|
|
12
scene.cpp
12
scene.cpp
|
@ -77,7 +77,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "deleted.h"
|
||||
#include "effects.h"
|
||||
|
||||
#include <qdesktopwidget.h>
|
||||
#include <kephal/screens.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -323,13 +323,15 @@ void Scene::finalDrawWindow( EffectWindowImpl* w, int mask, QRegion region, Wind
|
|||
QList< QPoint > Scene::selfCheckPoints() const
|
||||
{
|
||||
QList< QPoint > ret;
|
||||
// Use QDesktopWidget directly, we're interested in "real" screens, not depending on our config.
|
||||
// Use Kephal directly, we're interested in "real" screens, not depending on our config.
|
||||
// TODO: Does Kephal allow fake screens as well? We cannot use QDesktopWidget as it will cause a crash if
|
||||
// the number of screens is different to what Kephal returns.
|
||||
for( int screen = 0;
|
||||
screen < qApp->desktop()->numScreens();
|
||||
screen < Kephal::ScreenUtils::numScreens();
|
||||
++screen )
|
||||
{ // test top-left and bottom-right of every screen
|
||||
ret.append( qApp->desktop()->screenGeometry( screen ).topLeft());
|
||||
ret.append( qApp->desktop()->screenGeometry( screen ).bottomRight() + QPoint( -5 + 1, -1 + 1 )
|
||||
ret.append( Kephal::ScreenUtils::screenGeometry( screen ).topLeft());
|
||||
ret.append( Kephal::ScreenUtils::screenGeometry( screen ).bottomRight() + QPoint( -5 + 1, -1 + 1 )
|
||||
+ QPoint( -1, 0 )); // intentionally moved one up, since the source windows will be one down
|
||||
}
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue