Fixed zooming bug in native-host-ext [Chrome] (#1936)

Co-authored-by: alazymeme <jkeasley@icloud.com>
Co-authored-by: 23rd <23rd@vivaldi.net>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Matthew Marlow
2021-07-25 08:13:21 -05:00
committed by GitHub
parent 700e092bf6
commit 6052a0ede6
4 changed files with 27 additions and 8 deletions
+11 -5
View File
@@ -191,7 +191,6 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
const QJsonObject &root)
{
auto app = getApp();
QString action = root.value("action").toString();
if (action.isNull())
@@ -211,13 +210,20 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
AttachedWindow::GetArgs args;
args.winId = root.value("winId").toString();
args.yOffset = root.value("yOffset").toInt(-1);
args.x = root.value("size").toObject().value("x").toInt(-1);
args.width = root.value("size").toObject().value("width").toInt(-1);
args.height = root.value("size").toObject().value("height").toInt(-1);
{
const auto sizeObject = root.value("size").toObject();
args.x = sizeObject.value("x").toDouble(-1.0);
args.pixelRatio = sizeObject.value("pixelRatio").toDouble(-1.0);
args.width = sizeObject.value("width").toInt(-1);
args.height = sizeObject.value("height").toInt(-1);
}
args.fullscreen = attachFullscreen;
qCDebug(chatterinoNativeMessage)
<< args.x << args.width << args.height << args.winId;
<< args.x << args.pixelRatio << args.width << args.height
<< args.winId;
if (_type.isNull() || args.winId.isNull())
{