[education/rkward] rkward/rbackend/rkwarddevice: Fix build on Windows
Thomas Friedrichsmeier
null at kde.org
Sun Aug 24 16:08:55 BST 2025
Git commit 9f5773cd048b1d038c04886d6051b9a648e21bdd by Thomas Friedrichsmeier.
Committed on 24/08/2025 at 15:06.
Pushed by tfry into branch 'master'.
Fix build on Windows
M +5 -6 rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
https://invent.kde.org/education/rkward/-/commit/9f5773cd048b1d038c04886d6051b9a648e21bdd
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
index d7f544e1e..abc6fce81 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
@@ -203,12 +203,11 @@ void RKGraphicsDevice::updateNow() {
void RKGraphicsDevice::checkSize() {
RK_TRACE(GRAPHICS_DEVICE);
if (!view) return;
- if (view->size() != area.size()) {
- if (view->size().isEmpty()) return;
-#warning FIXME Sometimes called after closeDevice (key no longer present).
- RInterface::issueCommand(
- new RCommand(u"rkward:::RK.resize("_s + QString::number(devices.key(this) + 1) + u',' + QString::number(id) + u')', RCommand::PriorityCommand));
- }
+ if (view->size() == area.size()) return;
+ if (view->size().isEmpty()) return;
+ auto devnum = devices.key(this, -1) + 1;
+ if (devnum < 1) return; // Workaround / FIXME Sometimes called after closeDevice (key no longer present).
+ RInterface::issueCommand(new RCommand(u"rkward:::RK.resize("_s + QString::number(devnum) + u',' + QString::number(id) + u')', RCommand::PriorityCommand));
}
RKGraphicsDevice *RKGraphicsDevice::newDevice(int devnum, double width, double height, const QString &title, bool antialias, bool hidden, quint32 id) {
More information about the rkward-tracker
mailing list