diff options
author | David Robillard <d@drobilla.net> | 2022-05-29 14:57:25 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-30 14:34:05 -0400 |
commit | 2d18caf46d9c279fb193dc2a460d53d93b3717b5 (patch) | |
tree | 4dfa9fc08850faea3b8639cf9e4ca0e6dfbb9d00 /src | |
parent | f5af5ebd51d03a642ad9af515745dcb81730ac3d (diff) | |
download | suil-2d18caf46d9c279fb193dc2a460d53d93b3717b5.tar.gz suil-2d18caf46d9c279fb193dc2a460d53d93b3717b5.tar.bz2 suil-2d18caf46d9c279fb193dc2a460d53d93b3717b5.zip |
Fix MacOS build
I can't for the life of me figure out how to do this portably with C++ casts,
since the native types are very different between platforms (pointer on MacOS,
integer on X11). So, just give up and go back to C casts here.
Diffstat (limited to 'src')
-rw-r--r-- | src/gtk2_in_qt5.cpp | 4 | ||||
-rw-r--r-- | src/qt5_in_gtk.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gtk2_in_qt5.cpp b/src/gtk2_in_qt5.cpp index a5c98f1..47c8271 100644 --- a/src/gtk2_in_qt5.cpp +++ b/src/gtk2_in_qt5.cpp @@ -41,6 +41,7 @@ SUIL_DISABLE_GTK_WARNINGS #include <gtk/gtk.h> SUIL_RESTORE_WARNINGS +#include <cstdint> #include <cstdlib> extern "C" { @@ -95,8 +96,7 @@ wrapper_wrap(SuilWrapper* wrapper, SuilInstance* instance) gtk_container_add(GTK_CONTAINER(plug), widget); gtk_widget_show_all(plug); - const WId wid = - static_cast<WId>(gtk_plug_get_id(reinterpret_cast<GtkPlug*>(plug))); + const WId wid = (WId)gtk_plug_get_id(GTK_PLUG(plug)); QWindow* window = QWindow::fromWinId(wid); QWidget* container = diff --git a/src/qt5_in_gtk.cpp b/src/qt5_in_gtk.cpp index 6277daa..1c614c7 100644 --- a/src/qt5_in_gtk.cpp +++ b/src/qt5_in_gtk.cpp @@ -125,7 +125,7 @@ suil_qt_wrapper_realize(GtkWidget* w, gpointer) { SuilQtWrapper* const wrap = SUIL_QT_WRAPPER(w); GtkSocket* const s = GTK_SOCKET(w); - const WId id = static_cast<WId>(gtk_socket_get_id(s)); + const WId id = (WId)gtk_socket_get_id(s); wrap->qembed->winId(); wrap->qembed->windowHandle()->setParent(QWindow::fromWinId(id)); |