2014-04-17 15:33:11 +00:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2014 Martin Gräßlin <mgraesslin@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
|
|
|
#ifndef KWIN_SCREENS_XRANDR_H
|
|
|
|
#define KWIN_SCREENS_XRANDR_H
|
|
|
|
// kwin
|
2019-06-13 09:36:07 +00:00
|
|
|
#include "outputscreens.h"
|
2014-04-17 15:33:11 +00:00
|
|
|
#include "x11eventfilter.h"
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
2019-06-13 09:36:07 +00:00
|
|
|
class X11StandalonePlatform;
|
2014-04-17 15:33:11 +00:00
|
|
|
|
2019-06-13 09:36:07 +00:00
|
|
|
class XRandRScreens : public OutputScreens, public X11EventFilter
|
2014-04-17 15:33:11 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-06-13 09:36:07 +00:00
|
|
|
XRandRScreens(X11StandalonePlatform *backend, QObject *parent = nullptr);
|
2014-04-17 15:33:11 +00:00
|
|
|
virtual ~XRandRScreens();
|
|
|
|
void init() override;
|
2019-06-13 09:36:07 +00:00
|
|
|
|
2016-06-08 10:46:02 +00:00
|
|
|
QSize displaySize() const override;
|
2014-04-17 15:33:11 +00:00
|
|
|
|
|
|
|
using QObject::event;
|
|
|
|
bool event(xcb_generic_event_t *event) override;
|
|
|
|
|
2019-06-13 09:36:07 +00:00
|
|
|
private:
|
2014-04-17 15:33:11 +00:00
|
|
|
void updateCount() override;
|
|
|
|
|
2019-06-13 09:36:07 +00:00
|
|
|
X11StandalonePlatform *m_backend;
|
2014-04-17 15:33:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|