kdeconnect-kde/plugins/mousepad/mousepadplugin.h
Martin Gräßlin ab5438d338 [mousepad] Use QX11Info to get the Display
Don't open a second Display, we can use the one used by Qt.
Advantages are: we are on the correct Display, we don't open a Display
connection on e.g. Wayland (it would succeed but not work as a connection
to Xwayland would be opened) and we can drop the copy of fixx11h.

It's also a prerequisite to properly split the implementation to support
Wayland in a later change.

REVIEW: 124230
2015-07-03 09:43:01 +02:00

49 lines
1.4 KiB
C++

/**
* Copyright 2014 Ahmed I. Khalil <albertvaka@gmail.com>
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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 MOUSEPADPLUGIN_H
#define MOUSEPADPLUGIN_H
#include <QtGui/QCursor>
#include <core/kdeconnectplugin.h>
#define PACKAGE_TYPE_MOUSEPAD QLatin1String("kdeconnect.mousepad")
struct FakeKey;
class MousepadPlugin
: public KdeConnectPlugin
{
Q_OBJECT
public:
explicit MousepadPlugin(QObject *parent, const QVariantList &args);
virtual ~MousepadPlugin();
virtual bool receivePackage(const NetworkPackage& np);
virtual void connected() { }
private:
FakeKey* m_fakekey;
bool m_x11;
};
#endif