~ubuntu-branches/ubuntu/wily/kwin/wily-proposed

« back to all changes in this revision

Viewing changes to screens.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-08-10 23:16:37 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20150810231637-5zb2tstjkez93hml
Tags: 4:5.3.95-0ubuntu1
new upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
*********************************************************************/
20
20
#include "screens.h"
 
21
#include <abstract_client.h>
21
22
#include <client.h>
22
23
#include "cursor.h"
 
24
#include "utils.h"
23
25
#include "settings.h"
24
26
#include <workspace.h>
25
27
#include <config-kwin.h>
87
89
 
88
90
QString Screens::name(int screen) const
89
91
{
90
 
    qWarning("%s::name(int screen) is a stub, please reimplement it!", metaObject()->className());
 
92
    Q_UNUSED(screen)
 
93
    qCWarning(KWIN_CORE, "%s::name(int screen) is a stub, please reimplement it!", metaObject()->className());
91
94
    return QLatin1String("DUMMY");
92
95
}
93
96
 
94
97
float Screens::refreshRate(int screen) const
95
98
{
96
 
    qWarning("%s::refreshRate(int screen) is a stub, please reimplement it!", metaObject()->className());
 
99
    Q_UNUSED(screen)
 
100
    qCWarning(KWIN_CORE, "%s::refreshRate(int screen) is a stub, please reimplement it!", metaObject()->className());
97
101
    return 60.0f;
98
102
}
99
103
 
143
147
    setCurrent(number(pos));
144
148
}
145
149
 
146
 
void Screens::setCurrent(const Client *c)
 
150
void Screens::setCurrent(const AbstractClient *c)
147
151
{
148
152
    if (!c->isActive()) {
149
153
        return;
166
170
    if (m_currentFollowsMouse) {
167
171
        return number(Cursor::pos());
168
172
    }
169
 
    Client *client = Workspace::self()->activeClient();
 
173
    AbstractClient *client = Workspace::self()->activeClient();
170
174
    if (client && !client->isOnScreen(m_current)) {
171
175
        return client->screen();
172
176
    }