mirror of
https://invent.kde.org/network/krfb
synced 2024-07-01 07:24:29 +00:00
Fix broken WId refactoring
Actually remove the WId member from the abtract framebuffer class and use the member in xcbframebuffer qtframebuffer also uses the WId so add a member there
This commit is contained in:
parent
4169a9f50a
commit
04494dfeb0
|
@ -13,7 +13,8 @@
|
|||
#include <QRegion>
|
||||
#include <QPixmap>
|
||||
#include <QBitmap>
|
||||
#include <QGuiApplication>
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QScreen>
|
||||
|
||||
|
||||
|
@ -22,6 +23,7 @@ const int UPDATE_TIME = 500;
|
|||
QtFrameBuffer::QtFrameBuffer(QObject *parent)
|
||||
: FrameBuffer(parent)
|
||||
{
|
||||
win = QApplication::desktop()->winId();
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
if (screen) {
|
||||
primaryScreen = screen;
|
||||
|
|
|
@ -38,6 +38,7 @@ public Q_SLOTS:
|
|||
void updateFrameBuffer();
|
||||
|
||||
private:
|
||||
WId win;
|
||||
QImage fbImage;
|
||||
QTimer *t;
|
||||
QScreen *primaryScreen;
|
||||
|
|
|
@ -180,7 +180,7 @@ XCBFrameBuffer::XCBFrameBuffer(QObject *parent):
|
|||
}
|
||||
|
||||
d->framebufferImage = xcb_image_get(QX11Info::connection(),
|
||||
this->win,
|
||||
d->win,
|
||||
d->area.left(),
|
||||
d->area.top(),
|
||||
d->area.width(),
|
||||
|
@ -249,7 +249,7 @@ XCBFrameBuffer::XCBFrameBuffer(QObject *parent):
|
|||
// will return 1 on success (yes!)
|
||||
int shmget_res = xcb_image_shm_get(
|
||||
QX11Info::connection(),
|
||||
this->win,
|
||||
d->win,
|
||||
d->updateTile,
|
||||
d->shminfo,
|
||||
d->area.left(), // x
|
||||
|
@ -557,7 +557,7 @@ QList<QRect> XCBFrameBuffer::modifiedTiles() {
|
|||
// translate whe coordinates
|
||||
xcb_shm_get_image_cookie_t sgi_cookie = xcb_shm_get_image(
|
||||
QX11Info::connection(),
|
||||
this->win,
|
||||
d->win,
|
||||
d->area.left() + r.left(),
|
||||
d->area.top() + r.top(),
|
||||
r.width(),
|
||||
|
@ -612,7 +612,7 @@ QList<QRect> XCBFrameBuffer::modifiedTiles() {
|
|||
// need function that copies pixels from one image to another
|
||||
xcb_image_t *damagedImage = xcb_image_get(
|
||||
QX11Info::connection(),
|
||||
this->win,
|
||||
d->win,
|
||||
r.left(),
|
||||
r.top(),
|
||||
r.width(),
|
||||
|
@ -652,7 +652,7 @@ void XCBFrameBuffer::startMonitor() {
|
|||
|
||||
d->running = true;
|
||||
d->damage = xcb_generate_id(QX11Info::connection());
|
||||
xcb_damage_create(QX11Info::connection(), d->damage, this->win,
|
||||
xcb_damage_create(QX11Info::connection(), d->damage, d->win,
|
||||
XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES);
|
||||
|
||||
// (currently) we do not call xcb_damage_subtract() EVER, because
|
||||
|
|
|
@ -52,7 +52,6 @@ Q_SIGNALS:
|
|||
void frameBufferChanged();
|
||||
|
||||
protected:
|
||||
WId win;
|
||||
char *fb = nullptr;
|
||||
QList<QRect> tiles;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user