Fix gtk4 migration#39
Conversation
|
This does not compile: In file included from OpenPHIGS/src/include/phigs/ws_inp.h:53, |
|
@schwicke thank you for catching that! The Since GTK4 doesn't use Xt action procs for input handling, I have wrapped those specific declarations in I have pushed the fix. Please pull the latest changes and try compiling again! Let me know if you run into anything else. |
|
It may make sense to update the tests to run with GTK4 enabled since it still fails to compile, now in |
6996bdc to
b6bb5aa
Compare
|
As for the other one, this feature is not urgent: Motif is still present in all recently released Linux distributions I have checked so far, so we have literally years to get this fixed. Please do not waste too much time with this. This one will be tricky, and it will require quite some code changes. I think what you did already gives a good hint into which direction to go to get this fixed. Many thanks for your contributions !!! |
Description
This PR introduces the initial framework for Issue #37 (Native Support for GTK4), allowing the library to be conditionally compiled against modern GTK4 instead of legacy Motif/Xaw via the
USE_GTK4=ONCMake flag.Changes Included
CMakeLists.txtto conditionally probe forgtk4.pcusingpkg_check_moduleswhenUSE_GTK4is active.XtAppContextandWidget) inws.handsin.hto dynamically typedef toGtkWidget*and generic pointers under GTK4 context.phg_cpm_init_toolkitand the workstation event dispatchers (wsx_inp.c,ws_pm.c) to safely invokegtk_init()and pollg_main_context_iteration()alongside the native X11 message queue, bridging the gap between raw GLX rendering and GTK4 GUI event handling.sin_val.c,sin_str.c, andsin_cho.cto wrap the legacy inputs with modernGtkDialogconfigurations usingGtkScale,GtkEntry, andGtkListBox.please test the changes, tell me if they are working , if there are any errors please tell me