GTK4 not working on Microsoft Windows
Hi, I hope this is the correct place for this issue. I'm in the unfortunate situation that I want to run my gtk4 application on Microsoft Windows with msys/mingw. The setup is working so far with GTK3, but with GTK4 it does not work.
The code below works with GTK3 and creates a window (modified the require_version
fields), but with GTK4 no window is created. However, the task bar icon is created and the application waits for app.run()
to complete. There is no error message or similar, just no window.
Example Code:
import gi
gi.require_version("Gtk", "4.0")
gi.require_version("Gdk", "4.0")
from gi.repository import Gtk, Gio
def on_activate(app):
win = Gtk.ApplicationWindow(application=app)
win.present()
app = Gtk.Application(application_id='com.example.App')
app.connect('activate', on_activate)
app.run(None)