This commit is contained in:
committed by
Git OBS Bridge
parent
2897d7b5e6
commit
7956e898bd
@@ -2,7 +2,16 @@ diff --git a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp
|
||||
index ca2667f..0b7c072 100644
|
||||
--- a/xembed-sni-proxy/sniproxy.cpp
|
||||
+++ b/xembed-sni-proxy/sniproxy.cpp
|
||||
@@ -191,6 +191,10 @@ SNIProxy::~SNIProxy()
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QTimer>
|
||||
|
||||
-#include <QPainter>
|
||||
+#include <QBitmap>
|
||||
|
||||
#include <KWindowSystem>
|
||||
#include <netwm.h>
|
||||
@@ -191,6 +191,10 @@
|
||||
void SNIProxy::update()
|
||||
{
|
||||
const QImage image = getImageNonComposite();
|
||||
@@ -13,7 +22,7 @@ index ca2667f..0b7c072 100644
|
||||
|
||||
int w = image.width();
|
||||
int h = image.height();
|
||||
@@ -240,11 +244,61 @@ QImage SNIProxy::getImageNonComposite()
|
||||
@@ -240,11 +244,70 @@
|
||||
|
||||
xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP);
|
||||
|
||||
@@ -63,6 +72,15 @@ index ca2667f..0b7c072 100644
|
||||
+ return QImage();
|
||||
+ }
|
||||
+
|
||||
+ if (format == QImage::Format_RGB32 && xcbImage->bpp == 32)
|
||||
+ {
|
||||
+ QImage m = image.createHeuristicMask();
|
||||
+ QBitmap mask(QPixmap::fromImage(m));
|
||||
+ QPixmap p = QPixmap::fromImage(image);
|
||||
+ p.setMask(mask);
|
||||
+ image = p.toImage();
|
||||
+ }
|
||||
+
|
||||
+ // work around an abort in QImage::color
|
||||
+ if (image.format() == QImage::Format_MonoLSB) {
|
||||
+ image.setColorCount(2);
|
||||
@@ -76,6 +94,7 @@ index ca2667f..0b7c072 100644
|
||||
//____________properties__________
|
||||
|
||||
QString SNIProxy::Category() const
|
||||
|
||||
diff --git a/xembed-sni-proxy/sniproxy.h b/xembed-sni-proxy/sniproxy.h
|
||||
index 29aa56e..89746a7 100644
|
||||
--- a/xembed-sni-proxy/sniproxy.h
|
||||
@@ -88,7 +107,7 @@ index 29aa56e..89746a7 100644
|
||||
|
||||
#include "snidbus.h"
|
||||
|
||||
@@ -141,6 +142,7 @@ Q_SIGNALS:
|
||||
@@ -141,6 +142,7 @@
|
||||
private:
|
||||
void sendClick(uint8_t mouseButton, int x, int y);
|
||||
QImage getImageNonComposite();
|
||||
|
Reference in New Issue
Block a user