~mir-team/qtmir/trunk

« back to all changes in this revision

Viewing changes to src/platforms/mirserver/mirwindowmanager.h

  • Committer: Bileto Bot
  • Author(s): Albert Astals Cid, Gerry Boland
  • Date: 2017-03-20 21:15:13 UTC
  • mfrom: (606.4.12 make_sure_surface_not_null)
  • Revision ID: ci-train-bot@canonical.com-20170320211513-z7v3z0ldes3gtcc0
Check for find() result not being null before using it

We do it in onWindowReady, onWindowMoved, onWindowFocusChanged, etc so no reason to not do it in onWindowRemoved

Approved by: Lukáš Tinkl, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2015 Canonical, Ltd.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it under
5
 
 * the terms of the GNU Lesser General Public License version 3, as published by
6
 
 * the Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
 
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
 * Lesser General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU Lesser General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 */
16
 
 
17
 
#ifndef QPAMIRSERVER_WINDOW_MANAGER_H
18
 
#define QPAMIRSERVER_WINDOW_MANAGER_H
19
 
 
20
 
#include <mir/shell/window_manager.h>
21
 
 
22
 
#include <QObject>
23
 
#include <QSize>
24
 
 
25
 
namespace mir {
26
 
    namespace shell {
27
 
        class DisplayLayout;
28
 
        class FocusController;
29
 
    }
30
 
}
31
 
 
32
 
class MirWindowManager : public QObject, public mir::shell::WindowManager
33
 
{
34
 
    Q_OBJECT
35
 
 
36
 
public:
37
 
    static std::shared_ptr<MirWindowManager> create(
38
 
        mir::shell::FocusController* focus_controller,
39
 
        const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout);
40
 
 
41
 
Q_SIGNALS:
42
 
    // requires Qt::BlockingQueuedConnection!!
43
 
    void sessionAboutToCreateSurface(const std::shared_ptr<mir::scene::Session> &session,
44
 
                                     int type, QSize &size);
45
 
};
46
 
 
47
 
#endif /* QPAMIRSERVER_WINDOW_MANAGER_H */