on xenial help sign in
display id
e2b3955Nick Dedekind
plugins/WindowManager/Screen.cpp−6
@@ -52,12 +52,6 @@ void Screen::setCurrentWorkspace2(Workspace *workspace)
52 workspace->setCurrentOn(this);
52 workspace->setCurrentOn(this);
53}
53}
54
54
55−qtmir::OutputId Screen::outputId() const
56−{
57− if (!m_wrapped) return qtmir::OutputId(-1);
58− return m_wrapped->outputId();
59−}
60−
61bool Screen::used() const
55bool Screen::used() const
62{
56{
63 if (!m_wrapped) return false;
57 if (!m_wrapped) return false;
plugins/WindowManager/Screen.h−2
@@ -31,8 +31,6 @@ class Screen: public QObject
31 Q_PROPERTY(WorkspaceModel* workspaces READ workspaces CONSTANT)
31 Q_PROPERTY(WorkspaceModel* workspaces READ workspaces CONSTANT)
32 Q_PROPERTY(Workspace* currentWorkspace READ currentWorkspace WRITE setCurrentWorkspace2 NOTIFY currentWorkspaceChanged)
32 Q_PROPERTY(Workspace* currentWorkspace READ currentWorkspace WRITE setCurrentWorkspace2 NOTIFY currentWorkspaceChanged)
33public:
33public:
34− // From qtmir::Screen
35− qtmir::OutputId outputId() const;
36 bool used() const;
34 bool used() const;
37 QString name() const;
35 QString name() const;
38 float scale() const;
36 float scale() const;
tests/mocks/WindowManager/MockScreens.cpp+4−4
@@ -72,7 +72,7 @@ public:
72 }
72 }
73 }
73 }
74
74
75− qtmir::OutputId outputId() const override { return m_id; }
75+ miral::DisplayId displayId() const override { return m_id; }
76 bool used() const override { return m_used; }
76 bool used() const override { return m_used; }
77 QString name() const override { return m_name; }
77 QString name() const override { return m_name; }
78 float scale() const override { return m_scale; }
78 float scale() const override { return m_scale; }
@@ -106,7 +106,7 @@ public:
106 qtmir::ScreenConfiguration *beginConfiguration() const override {
106 qtmir::ScreenConfiguration *beginConfiguration() const override {
107 auto config = new qtmir::ScreenConfiguration;
107 auto config = new qtmir::ScreenConfiguration;
108 config->valid = true;
108 config->valid = true;
109− config->id = m_id;
109+ config->id = m_id.output_id;
110 config->used = m_used;
110 config->used = m_used;
111 config->topLeft = m_position;
111 config->topLeft = m_position;
112 config->currentModeIndex = m_currentModeIndex;
112 config->currentModeIndex = m_currentModeIndex;
@@ -127,7 +127,7 @@ public:
127 }
127 }
128
128
129public:
129public:
130− qtmir::OutputId m_id{0};
130+ miral::DisplayId m_id;
131 bool m_active{false};
131 bool m_active{false};
132 bool m_used{true};
132 bool m_used{true};
133 QString m_name;
133 QString m_name;
@@ -153,7 +153,7 @@ MockScreens::MockScreens()
153 QPoint lastPoint(0,0);
153 QPoint lastPoint(0,0);
154 for (int i = 0; i < screenCount; ++i) {
154 for (int i = 0; i < screenCount; ++i) {
155 auto screen = new MockScreen();
155 auto screen = new MockScreen();
156− screen->m_id = qtmir::OutputId{i};
156+ screen->m_id.output_id = miral::OutputId{i};
157 screen->m_active = i == 0;
157 screen->m_active = i == 0;
158 screen->m_name = QString("Monitor %1").arg(i);
158 screen->m_name = QString("Monitor %1").arg(i);
159 screen->m_position = QPoint(lastPoint.x(), lastPoint.y());
159 screen->m_position = QPoint(lastPoint.x(), lastPoint.y());