[kwin_wayland] Init Outputs from screen information
Removes the hack for startup. Still needs proper physical size.
This commit is contained in:
parent
0f945f53fe
commit
dc0f040185
2 changed files with 14 additions and 5 deletions
|
@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "wayland_server.h"
|
||||
#include "screens.h"
|
||||
#include "toplevel.h"
|
||||
#include "workspace.h"
|
||||
|
||||
|
@ -68,12 +69,19 @@ void WaylandServer::init(const QByteArray &socketName)
|
|||
m_shell = m_display->createShell(m_display);
|
||||
m_shell->create();
|
||||
m_display->createShm();
|
||||
}
|
||||
|
||||
// we need a dummy output
|
||||
OutputInterface *output = m_display->createOutput(m_display);
|
||||
output->setPhysicalSize(QSize(10, 10));
|
||||
output->addMode(QSize(1024, 768));
|
||||
output->create();
|
||||
void WaylandServer::initOutputs()
|
||||
{
|
||||
Screens *s = screens();
|
||||
Q_ASSERT(s);
|
||||
for (int i = 0; i < s->count(); ++i) {
|
||||
OutputInterface *output = m_display->createOutput(m_display);
|
||||
// TODO: fixme
|
||||
output->setPhysicalSize(QSize(269, 168));
|
||||
output->addMode(s->size(i));
|
||||
output->create();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ class KWIN_EXPORT WaylandServer : public QObject
|
|||
public:
|
||||
virtual ~WaylandServer();
|
||||
void init(const QByteArray &socketName = QByteArray());
|
||||
void initOutputs();
|
||||
|
||||
KWayland::Server::Display *display() {
|
||||
return m_display;
|
||||
|
|
Loading…
Reference in a new issue